#blueprint

402296 messages · Page 943 of 403

faint pasture
#

That's like asking why flying doesn't work on your couch

#

doesn't make any sense

#

AnimBP looks at the Actor, that's it

sand gazelle
#

That jives. It worked once I moved the roc to the actor BP

#

Rpc*

onyx violet
#

all you do with animbp is cast to character get variables then use those to create your animation graph

#

or drive your animation graph

sand gazelle
#

It's annoying that you can set replication on animBPs but I guess it's just a BP so it be how it do I guess

onyx violet
#

so i'm just thinking about this more, i'm not sure if it will fix the problem, the issue is the scale value being used on addmovementinput node

#

maybe i'm thinking of it wrong, not sure how I would apply using this

#

would i take the output vector and get it's length?

#

then plug that into addmovementinput?

#

i'll give it a try

shadow field
#

so i asked about the whole don't trigger an overlap until the character stops moving before and tried the velocity<0 thing or even is moving node but nothing seems to work as i can't get the velocity of the ai character, i even tried to use vector length after get velocity

dense thicket
#

anyone knows how to make a "trampoline" effect on a triggerbox?
cant seem to find anything on it on YT

terse stream
shadow field
#

yeah i tried that but for some reason it doesn't trigger the overlap, and i have no idea why

terse stream
#

Did you check the channels in the collision settings of both objects?

tawdry surge
#

@dense thicket launch character

shadow field
#

yeah the overlap works if i have nothing else but the overlap but i don't want it to trigger as soon as the character enters

terse stream
#

That's what an overlap does though

#

How do you want it to work?

shadow field
#

i want to open a widget but i don't want it to open while the character is moving and/or walking past the tile space

tawdry surge
#

You can use it to trigger a timer and check velocity while overlapping.
Then clear it on overlap end

onyx violet
#

^ that seems like a good way to do it

shadow field
#

yes it does i shall try

tawdry surge
#

You could probably run it on tick by just enabling and disabling tick on the overlap events, but not 100% if overlap events actually work on a non ticking actor

shadow field
#

i mean unless theres an easier way to open the widget as soon as the characters stop on the space lol

#

and doesn't open when walking past

onyx violet
terse stream
#

It's a bit elaborate and didn't test it, but maybe it helps you @shadow field

onyx violet
#

so when you press the button you could check what the player is near or looking at

#

but maybe that doesn't fit your design

shadow field
#

its a board game so dice roll and movement, i have it all working just can't seem to figure this part out

#

and i will give that a try electric

terse stream
#

behind the "Do Once" would be your part obv

tawdry surge
#

Oh if it's a board game and you wanna display a widget based on the space landed on, I'd do that with a linetrace inside a bt task.
Electric's suggestion will work

shadow field
#

yes it does just have to make it so it opens based on which space which i can do already so thanks 🙂

dense thicket
# tawdry surge <@81503980487712768> launch character

that seems to just make it "jump"? i need it to bounce.
So if the player hits an object on the ground, he needs to be launched into the air, but the he hits something that moves, he needs to be bounced in the obeset direction..
Actually like the bounce effect in the game "Fall Guys"

tawdry surge
#

It launches the character. The direction and speed are up to you to calculate. It only looks like jumping because by default when the character leaves the ground the jump animation plays

dense thicket
#

I cant set the velocity to something "global"?
like so no matter how the player its, its just gonna bounce off of it ?

terse stream
#

I'm not sure what you mean by "global" but usually you add the velocity of the moving object (which I'm assuming you're jumping against) to the launch

tawdry surge
#

Yeah idk how global would work, but you need to get the surface normal and use that to calculate your new velocity

dense thicket
#

like.. lets say i have a stick or something that moves in circles 360degrees.. if i get hit on the left side of it, i get bounced back, but if i get hit on the right side, i get bounced forward

terse stream
#

that is what's happening or what you want?

dense thicket
#

what i need

terse stream
#

And why would you want to get bounced back if you're hit from the left? Wouldn't you want your character to bounce to the right?

dense thicket
#

hehe let me draw it, makes it easier :p 2 sek

terse stream
#

But if I get you correctly you'll have a new issue, the rotating stick does only have a rotational velocity, not a "moving in a direction" velocity. So you need to calculate the theoretical velocity of the stick at the hit point

#

then launch your character with that velocity

dense thicket
#

something like this xD

terse stream
#

that's not symmetrical, one of these arrows need to either go inwards or outwards

dense thicket
#

what do you mean?
Sorry, non native to english :p

proven loom
#

is there a node for tick every X milliseconds?

terse stream
#

@dense thicket you can either have this

tawdry surge
#

You just need the velocity of the player and the normal of the surface hit. Im blanking in the math to get your bounce vector

terse stream
#

or this

terse stream
dense thicket
#

Ohh haha true

#

it was just a quick drawing to tell what i ment :p

#

wither way is fine

tawdry surge
#

Its called a reflection vector tho

proven loom
dense thicket
tawdry surge
#

Yeah

#

I can't remember the exact formula off the top of my head but there are definitely youtube videos for it

terse stream
#

Either way, you need to calculate the velocity of the stick at the impact point. Meaning if your stick turns at 10° per second, and you are 1 meter away from the center, your velocity will be this

dense thicket
#

thank you so much, ill look into that 🙂

terse stream
#

Where t is the time in which the stick has rotated a degrees, with the distance d from the stick's center point

#

that will be your velocity

#

then you can get the normal of the impact and scale it by the velocity

#

and that's your launch vector

#

@dense thicket

terse stream
#

alternatively to the normal, you can calculate your own normal (which I think works a lot nicer in many ways). By taking the location of your character and subtracting the location of the impact point.

dense thicket
#

either way, i fucking suck at math hahaha
so thats not gonna happend xD ill see if i can find something out xD
thanks a lot 😄

tawdry surge
#

Probably. It's a pretty standard formula

dense thicket
#

ah okay, ill try that ^^
Thanks 😄

terse stream
#

It will most likely not be accurate though, but yes that works

dense thicket
#

dont have to be very accurate, just needs to bounce a little

terse stream
#

because that just makes you bounce by the velocity you ran into it

tawdry surge
#

Id watch Ryan layley's instead. Atleast he talks

terse stream
#

but it will not incorporate the movement of the stick

dense thicket
#

oh

terse stream
#

a reflection vector is basically a mirror

#

but what you can do is just add a fixed vector to it

tawdry surge
#

You can calculate the force of impact and add it in but that would be a secondary step

terse stream
#

that would be the equivalent of saying "everytime you hit the stick, you get bumped by xyz amount of force"

#

it depends on how accurate you want it

tawdry surge
#

Yeah. This assumes one of the actors is static. Like I said once you have your direction and the bounce works, you can calculate the increase to the magnitude of the new velocity

terse stream
#

Well the stick is "static" since it only has rotational movement right?

tawdry surge
#

Static thing that moves.. hmm

dense thicket
#

no its moveable

terse stream
#

What I'm saying is that the Actor's velocity will be 0

#

since the origin of it will not change place

#

it will only rotate

#

therefore the Actor's velocity will be 0

#

even if it appears to be moving

#

because the center is not moving

#

that's why I posted this formula

tawdry surge
#

The stick rotation is what add extra force to the reflection. The reflection by itself assumes you hit a wall or something that is not applying its own force on the reflected object

terse stream
#

which calculates the actual velocity of the thing

#

How do you get the stick's rotational force to reflect with though? Apart from the formula I posted

tawdry surge
#

I'm sure that works just fine. It's just separate from the reflection vector. There's also a rotating movement component that I'm pretty sure would give you the Rotational velocity

terse stream
#

Maybe, I'm not too familiar with it.

tawdry surge
#

Unreal has alot of math nodes and the movement components handle alot of the common math for you

terse stream
#

Yeah maybe I should look more into them 😄 I'm usually fine with calculating stuff myself, I think it's pretty fun 😄

tawdry surge
#

It's definitely good to be able to do. Sometimes you need to do it yourself

cedar sparrow
#

can you add a static mesh component to a blueprint at run time?

tawdry surge
#

Yes

onyx violet
#

hey @terse stream clamping the vector did not work, the total movement input is still ending up being greater than it should when going diagonal making the slow down not work. this is what I ended up with for the code

#

a decent way to think of it is that the length from the center of a square to a corner is longer than the length from the center to a side

#

i'm just not sure what kind of math I need to do for it

tawdry surge
#

There's a normalize node too

onyx violet
#

yeah I thought it would maybe be that, i'm not sure how it works exactly but i'll try it

tawdry surge
#

Or you could just do *.5 since forward and right vector are normalized already. So adding them together makes the length 2

#

As long as the vertical and horizontal values are in a 1 to -1 range

onyx violet
#

so normalizing it did keep the value in the correct range but it's also doesn't seem to be effected by the slowdown multiplier

onyx violet
tawdry surge
#

The direction is just the direction. If you change scale to .8 or something below 1 the player will slow down

limber parcel
onyx violet
limber parcel
#

thx

onyx violet
cedar sparrow
#

how do i convert a local location vector to a world location vector?

foggy escarp
reef crypt
#

hey guys im pretty new to using ue4/blueprint and im using this premade horror kit and i've created a small level and placed items, i was wondering if there was a way for the pick ups to be randomized. currently there is an overarching BP_PickUp and there are different classes for all of the items (flashlight, battery, gun, ammo, key etc). i was thinking maybe i could create a class that can be selected that will randomize between the other classes? but im not too sure. can provide screenshots if needed

gentle urchin
#

Yes, you could do that

#

Make a bp_random pickup which initializes from the data of a random sibling from an array

#

Or just a completely empty actor, that spawns a random item on beginplay and destroys itself

broken quiver
#

how to search specific column from data table?

#

it seems you just get rows?

remote meteor
gentle urchin
broken quiver
#

welp. Thanks for the advice

cedar sparrow
#

I'm hitting an actor with a line trace, how do I turn that hit location into a local location of the actor?

gentle urchin
#

Of the actor thats tracing, or being hit?

#

converting from global to local just means taking the global part out of the equation

#

e.g. removing world location

junior hedge
#

i dont get why this isnt working?

#

it wont print anything

#

i am running into it with my first person character

fiery swallow
#

@junior hedge blocking and overlapping aren't the same thing

junior hedge
#

yeah ik now

#

i did some tests

fiery swallow
#

Something needs to overlap your character, and your character also needs to have "generate overlap events" option checked

junior hedge
#

do I need to use event hit?

#

because I just want collision

#

but event hit runs multiple times

#

would I just set a variable to make it so it doesnt run the event multiple times?

fiery swallow
#

You are wanting an event to fire when something overlaps/get's too close to your character? You can use a collision box or sphere for that

#

It would help though if I knew what you were trying to do

fiery swallow
junior hedge
#

this is what I ended up doing

#

it works technically

#

but it feels like im dodging the bush'

fiery swallow
#

is it suppose to be reset ever?

#

Because honestly you can just use a do once node and get rid of the bool

junior hedge
#

this node?

#

@fiery swallow how would I plug it in?

junior hedge
#

thx

#

any less tedious way to set arrays fast?

#

in the details part its very easy but here it's kind of tedious, would be very good if I could do this in 1 node

gentle urchin
#

This is not how one usually does it

junior hedge
gentle urchin
#

depends

#

on what item is ?

#

Random ?

junior hedge
#

?

gentle urchin
#

you're setting the box's arrays item to 1 and 5

#

why those particular numbers?

#

are they random?

junior hedge
#

yeah testing reasons

cedar sparrow
junior hedge
#

random numbers

gentle urchin
#

so you'd usually set up a small function for randomly filling a container with items

junior hedge
#

well it wont always be random

gentle urchin
#

depending on complexity and probability

#

well you can always add them manually, and untick "random"

junior hedge
#

ok this is how i want it to be

gentle urchin
#

So you'd have some range of what random items can be added here

#

some list of possible items

junior hedge
#

when opening a chest for the first time it generates random items that can be in there. Then it will permanently save that data

gentle urchin
junior hedge
#

oh you mean that

#

I have something else in mind actually on how I want to do this

gentle urchin
#

just the gist of how one would set it up

#

add complexity

junior hedge
#

thx

#

this is what I ended up doing

gentle urchin
#

This should be done inside the Box actor aswell

#

no need to use GetAllActorsOfClass

junior hedge
#

alright

acoustic wing
gentle urchin
#

restart editor

junior hedge
#

Is there an event that detects when it's no longer hitting?

acoustic wing
junior hedge
#

In the project settings there is a setting to dock the blueprint in the same window as the editor, try using that

acoustic wing
junior hedge
#

I don't remember what it's called also it's probably in preferences myb

acoustic wing
junior hedge
#

It's not a default option

acoustic wing
#

oh i found it it was minimized at the top of the screen in a second window for some reason ahah

#

thank you heaps for your help

junior hedge
#

Lol that bug sucks

still plume
#

How i can find the cause of these FPS drops? :/ i have try with some profiler but i don't understood where is the problem

short reef
#

Are there any good BP-based tutorial videos/example projects for how to handle typical single-player and multi-player game modes?

acoustic lava
#

Anyone know why a level would be blank?

#

Like Lyra's level

high ocean
#

Could I create and set variables with a bluetility widget on another widget?
Context: I need to set lots of variables when I create a new widget parented to a certain widget. I'd like to automate the creation and setting since It's all done at design-time anyway. Do you guys know of any blutility/blutility widget method that would allow for this? Or is this impossible since I can't grab the widget's reference anyway?

zinc steppe
#

Why on tutorials player movement from input is added to character blueprint instead of to controller blueprint?

pallid cedar
#

Hey there guys! I've made this crane model (skeletal mesh) and did 3 animations:

  • Crane_Idle
  • Crane_Breaking
  • Crane_BreakIdle

Added the model as a blueprint actor and set up a custom event to play the first (crane_breaking animation) with a delay of duration as long as the anim, then it ends up on a looping crane_Breakidle animation.

Placed a physical mesh crate on the crane which needs to fall down when the ropes break.

The code works, however, I noticed, although the animations play, the collision of the mesh doesn't update. Basically, it stays where it was and the crate model remains in the air with an invisible collision beneath it.

Anyone has any ideas on how to fix this?

gentle urchin
dense furnace
acoustic lava
gentle lance
#

Is there a way to change skeleton size with respect to morph target in UE5,
for example, child and adult morph targets in Daz3d have different skeleton size
but in UE5 changing the morph target does not change skeleton size.

drifting silo
#

Hello, Is there a way to update the values in a Material Parameter Collection via blueprint/cpp and actually have it changed in the Material Parameter Collection asset on disk?

dim tapir
#

I'm trying to make a simple character selection screen and implement it to my main menu. Now that I start the game I'm getting spawned below the world. I tried the "make transform" and took the location from my "Player start".
Any tip?

high ocean
#

@dim tapirYea, don't use a player start, spawn the player with blueprints

dim tapir
#

How would I go about doing that? Currently it looks like this when I start, it doesn't even load my UI

dry condor
#

thats australia! 😄

tawdry surge
#

Player start should work fine..
Is the player you're spawning being possessed by you?

dim tapir
#

It works if I force the pawn to start on a specific level instead of going through the main menu

dim tapir
#

Nevermind team, I solved it by moving the load map to the end instead of beginning! Thanks

acoustic wing
#

hi i have been following this tutorial trying to get my enemy AI to attack i think i followed it as best i could but i still cant seem to get it to play the attack animation maybe i have done something wrong with the bp any ideas ? https://awesometuts.com/blog/unreal-engine-enemy-ai/ < guide issue > https://www.youtube.com/watch?v=u_frx6rS-uQ

Reading Time: 28 minutes If you have enemies in your game then AI is an essential part of your gameplay that you need to create. In this post you are going to learn how to create enemy AI attack and random patrol using Blueprints and C++

real notch
#

Is there a way to find out if the game is running in the editor? What I really want to know is if the device supports touch input.

acoustic wing
icy dragon
viscid blaze
#

I have a Primary Data Asset, from which I've created a few Data Assets, but the Get Primary Asset ID List Node returns an array of zero length. Anyone have any idea of some "gotcha's" with Data Assets I may have missed that is messing me up?

I've done this in the past, and it's worked fine, so I'm not sure what I've missed when setting this up.

undone surge
#

if i always have 2 elements in an array always in random indexes is there a shortcut or node to leave a certain element and pick the other one

faint pasture
#

That doesn't make much sense. Is the array of size 2?

vivid inlet
#

Any ideas as to why my save function saves the current level but not the player transform?

#

When I use the load function it loads up the correct level the player was on when he saved but not his location.

undone surge
#

so baically im trying to make a teleporter which ive made but i want to make a logic so i dont tp to the same one . i have the bp 2 of them in the same map so i wana check if im near the first one i tp to the other and the other way around

#

@faint pasture

vivid inlet
#

Here's the Load game event btw.

faint pasture
#

Unless there's always just 2

#

then just get actors of class, remove self, get 0

undone surge
#

theres always 2 one end point one start point.

#

ok

faint pasture
#

Or just set a ref to OtherTeleporter in the editor

#

each one pointing to the other

undone surge
#

they are of the same class so i just set every time i tp ?

#

to the other one ?

faint pasture
cyan bone
#

I cant duplicate my blueprint. Its working fine when not duplicated. When i duplicate it just becomes a mess of errors all over the place. I need to make backups, so it would be nice to be able to copy it without messing it up in 100 places. Pls help.

limber parcel
#

welcome to macros

cyan bone
limber parcel
#

did u try opening the blueprint and seeing whats going on?

cyan bone
#

😆

limber parcel
#

did u ever click one of the errors and try figure out whats going on yourself?

dawn gazelle
# vivid inlet Here's the Load game event btw.

You probably shouldn't be setting the root component's transform, rather setting the actor's transform. Should also not need to cast the player character at all to get or set it's transform.

cyan bone
limber parcel
#

else nobody can help u

dawn gazelle
#

I think the issue you're experiencing is that your blueprint is that the "type" of the object is now different than what you were using. Perhaps instead of duplicating your blueprint, you make child classes of it?

limber parcel
#

yeah sounds legit

#

why are you even duplicating it?

lilac flint
#

I create a 2d game of fighting, i have do a flipbook for my punch animation but i don't know how do the blueprint for when i use my input NUMPAD1 its do the punch animation who can help me pls ?

cyan bone
vivid inlet
limber parcel
vivid inlet
drowsy ridge
#

Hey all, I'm having an issue with the camera here. I'm in the middle of prototyping a lock on system, I found the midpoint between the two actors, and I'm subtracting it from the camera location of my player character. I use a normalize node, then set the camera's rotation. The issue: the character goes out of bounds of the camera all the time! It's super problematic, and I want the camera to always be behind the character

cyan bone
limber parcel
#

its called github

zinc steppe
#

How do I get character controller from animation blueprint so I can assign animations based on current movement direction?

cyan bone
# limber parcel its called github

Ok i will get into that.
I think i found the issue with duplicating. Its because a lot of times im using the argument with the name of the blueprint. And when you duplicate its the same name but with + "1"

#

Thats what happens in most cases

limber parcel
#

yeah thats what @dawn gazelle was trying to tell you

cyan bone
#

I see now. But the issue with child classes is that they inherit everything

#

whereas i might need to completely change it

limber parcel
#

well then dont use stupid casting everywhere

cyan bone
#

thats true. but it not only casting its also the input of functions

limber parcel
#

in general u should just use actor or character class instead of casting to random bullshit

cyan bone
#

I think i will just do this from scratch

#

i know. its a bloody mess.

limber parcel
#

well everyone has to start somewhere lol

dry condor
#

you can just copy/paste you bp into a backup folder btw.

lilac flint
#

Hi I create a 2d game of fighting, i have do a flipbook for my punch animation but i don't know how do the blueprint for when i use my input NUMPAD1 its do the punch animation who can help me pls ?

dawn gazelle
# vivid inlet Hm, that didn't work. I'm using Player Start, is it possible that the player isn...

Well I think the other issue is that you're doing a "load level" then trying to do more after that. Once you do a "load level" like that, basically everything is destroyed, so the code you're trying to execute won't carry over to the next level.
You'll have to code your game in such a way that the game instance knows that it's a loaded game, then on begin play of your character or any other actors, read the game instance for the save game details they are supposed to use.

limber parcel
dry condor
#

no one at home 😄

dry condor
#

but yeah ofc source control would be even better

cyan bone
dawn gazelle
#

... is that a McDonald's employee?

limber parcel
#

america is ruled by McDonalds i guess 🤷‍♂️

vivid inlet
dry condor
#

or use something like github as source control recommended

limber parcel
cyan bone
#

i need to make this blueprint from scratch.

faint pasture
#

Your duplicate is probably bricking because you might have refs to the self type and maybe some update when duplicated and some don't.

cyan bone
#

i dont know how to use it yet

faint pasture
limber parcel
dry condor
#

you should add a bad too it imo 😄 @faint pasture

faint pasture
limber parcel
#

lol

faint pasture
#

Plastic Cloud is smooth sailing tho and dirt cheap or free depending on your project size

cyan bone
limber parcel
#

obviously, like everything else in unreal lol

forest edge
#

Hi - can I ask a question please? Just joined because i am killing myself trying to figure out how to do something I think isnt that complicated but i cant figure it out. I want to create a blueprint like a british police car siren/light, with 2 alternative flashing lights. One starts, is on for 1 sec, turns off, the second light turns on for 1 sec, then off (and repeat) I am pretty sure 2 point light actors in a blueprint and a couple of delays can do this but for whatever reason i can't figure out the order. Admittedly i am not very experienced with blueprints but could someone give me advice pleaassseeee 🙂 This is my idea, but it doesnt work at all. Thank yaaaa

dawn gazelle
limber parcel
#

i watch tutorials in 1.5x speed xD

cyan bone
limber parcel
faint pasture
dry condor
#

could also throw a timeline into the mix

faint pasture
rocky surge
#

why doesn't this play a animation?

limber parcel
#

he can just do a lerp and give one light the inverted lerp

forest edge
#

Thanks guys!! So its 2 lights next to each other, like either side of the top of a car (pic below). Both are blue, i think they phased out the red lights. so they need to be alternating and slightlyyyyy apart from each other

faint pasture
rocky surge
faint pasture
#

You're just turning lights on and off, not changing colors

dry condor
rocky surge
faint pasture
rocky surge
#

its a idle

limber parcel
#

you should watch some blueprint beginner tutorial

dry condor
faint pasture
limber parcel
#

and then u should watch tutorial about how to set up character animations

rocky surge
faint pasture
#

Idle animation isn't played per SE, it's the default state. You'd do this in the anim BP, the actor BP doesn't have to do anything

dry condor
#

magic

rocky surge
#

pretty weird that you always need a statement

faint pasture
#

Look at how the old mannequin animation is setup

faint pasture
dry condor
limber parcel
# rocky surge pretty weird that you always need a statement

Hello guys and welcome to the Unreal Engine 5, Blueprint for Beginners complete tutorial. In this video, I will explain what is blueprint - the visual scripting system of Unreal Engine. I will show you how to create blueprints, and walk you through, step-by-step, how to create a few blueprint classes. We will create a simple door you can open an...

▶ Play video
dry condor
#

also look into animation blueprints and state machines @rocky surge

rocky surge
#

alr

rocky surge
#

how to do somheting if the value of a int = somheting

runic terrace
dawn gazelle
#

When you change the int, you do the thing you need to do.

runic terrace
#

inside a class

dawn gazelle
#

Eg.
Set Health = Health - Damage
from there connect to a branch with the boolean set to:
Health <= 0.0
TRUE on the Branch: Perform Death Stuff

rocky surge
#

ah alr

cyan bone
#

Is an empty character actor more expensive than an empty actor?
Or this doesnt really matter?
Is it worth it to make it from scratch as an empty actor?

#

It seems the character actor just has the movement and the collision handled

dawn gazelle
faint pasture
runic terrace
cyan bone
#

but wait. walks in a weird way

faint pasture
#

What is it

cyan bone
#

Its like a unit

#

like a squad of units i mean

#

so i could lerp it maybe

faint pasture
#

Ya i wouldn't use character for a squad

#

I'd use it for an individual soldier maybe, depending on your design

cyan bone
#

so for the initial test it was good

#

but now im thinking i can just make it better

faint pasture
#

Is a soldier a character or the squad? Is a soldier a thing?

cyan bone
#

soldier is an ISM

runic terrace
#

ism?

faint pasture
#

You doing like a Civ / Advance Wars type thing?

cyan bone
runic terrace
#

You can use the Pawn class for top down view instead

faint pasture
#

ya idk if I'd use character as it implies certain things like a capsule collision etc

cyan bone
faint pasture
#

No and don't worry about cheaper

runic terrace
cyan bone
faint pasture
#

Object -> Actor -> Pawn -> Character is the heirarchy

cyan bone
#

So i should go with actor. And add in my movement customly with lerpy

faint pasture
#

I'd do a squad based on Pawn or Actor

#

Probably Actor unless you want AI to drive a Squad around

#

Pawn is just an actor that can be possessed

cyan bone
#

Well the AI will have their own squads

#

The issue then is that the character has the collision handled. And the character movement works flawlessly

#

whereas lerping i wasnt able yet to make the collision work

runic terrace
#

I'd say go for pawn for the player and the top-down view.
And if the "squad" walks around use Character for each member, if they're flying stuff you can use pawn or actor

faint pasture
#

What is the collision shape of a squad?

#

I would start with a soldier and have a squad just be an aggregation of them

cyan bone
faint pasture
#

And you're getting CMC to move this as root?

#

Like you replaced the capsule with this procedural mesh?

cyan bone
#

i move the whole squad

#

then the squad collides with other squads

#

and the soldiers are lerped individually to contact

faint pasture
#

Show your squad in the component outliner

cyan bone
#

else in formation its a rectangle

cyan bone
#

it seems the big difference between Character and Actor is the Character Movement

#

which is very handy

#

it handles the Path finding, rotation of the squad

#

collision

faint pasture
cyan bone
#

so maybe its not worth it to change it

faint pasture
#

You had just said you replaced the capsule so I had to see it but you didn't

cyan bone
#

else i would have to lerp it

cyan bone
#

a rectangle collision

limber parcel
cyan bone
#

it is supposed to be disabled

faint pasture
cyan bone
limber parcel
#

lol

faint pasture
#

Who gives a shit about cheaper, how much ms are you using right now?

runic terrace
runic terrace
#

Just do the most optimal way

faint pasture
#

fuck

faint pasture
cyan bone
#

wait

runic terrace
#

Damn that's a lot

cyan bone
#

sorry

#

70 fps

limber parcel
cyan bone
#

sorry

runic terrace
#

You don't need to worry about the resource cost, it will do almost no difference in performance

#

Just do the most optimal way you see fit and it will be fine

limber parcel
#

are u trying to make total war in unreal? xD

cyan bone
cyan bone
#

between total war and age of empires

#

more total war than age of empires

#

you will have a bit of building

limber parcel
#

im making mix of warcraft 3 and skyrim lol

cyan bone
#

so you can possess to Third person?

limber parcel
#

yes

cyan bone
#

thats amazing

#

would love to see it

limber parcel
#

indeed, i wonder why there isnt such game already

cyan bone
#

there is mount and blade that is not the same as you are doing

gentle urchin
#

Lerping is quite a bit cheaper yes ^

cyan bone
limber parcel
cyan bone
#

?

cyan bone
gentle urchin
#

It involves a few extra steps yes

cyan bone
#

the character movement handles all of that, if there is a rock with collision on the path

gentle urchin
#

Yeah itll step over it if possible

cyan bone
#

if i set it up it seems it will be much cheaper. because i will have many squads

gentle urchin
#

This is determined by the nav system tho

#

Char just keeps itself on the ground, so to speak

cyan bone
#

but it will be much harder. need the A path finding. and need lerp with collision

gentle urchin
#

A* pathfinding?

#

Lerp doesnt exclude collision directly

#

Just depends on which fidelity you care about

runic terrace
#

You don't need to use the character class to pathfind in a navMesh, the AI Controller has a pathfinding function built in so you can use it on Pawns as well.

cyan bone
#

it will go through it

gentle urchin
#

Solved by the nav system

#

Mostly..

#

There are cases it doesnt fix for sure

#

It gives far to few points ,

cyan bone
#

what if its a soldier. then nav system wont fix it

gentle urchin
#

Expecting the cmc to handle the rest or smth

cyan bone
#

soldier ISM on the way of the soldier ISM moving

gentle urchin
#

This is why i made by linetraced pathfixing function and put it on top of the nav system 🤣

cyan bone
#

i make a line towards the enemy squad center

gentle urchin
#

I made a line along the landscape

#

Hundreds of lines really

cyan bone
#

so if your line finds anything then you calculate a way around it?

#

thats tricky

#

especially if you are moving and then the obstacle is no longer there when you come close to it

gentle urchin
#

No, i made sure the nav system had enough space for me to walk around the object

#

Static pathing

#

Atleast, currently

cyan bone
#

but thats of obstacles that dont move

#

if the obstacles are other soldiers that move around, then it becomes messy

gentle urchin
#

And very costly

faint pasture
#

If I were making a strategy game I'd have individual units pathfinding and have squads be aggregators of them. You'd want to NOT use character but have your own movement system.

#

You can easily get thousands of individually moving units with a nice data oriented design but you won't have thousands of Character actors running around.

gentle urchin
#

Yes exactly

cyan bone
gentle urchin
#

With thousands of units i wouldnt care to much about unit to unit collision tbh

cyan bone
#

so its fine using character movement for the whole rectangle squad

gentle urchin
#

Doesnt make much sense

cyan bone
gentle urchin
#

Nor would it work

#

No, thats lerping

faint pasture
#

UnitSubsystemTick
UnitMovement:
For each Unit in UnitsArray
Unit.Velocity = SomeFunction
Unit.Position = SomeFunction(heightmap, Unit.Velocity, etc etc)

CollisionDetection:
Some code blah blah

Do Attack:
blah blah

Something like that

#

You'd want to assembly line that shit if you're going for high unit counts

gentle urchin
#

For a big war game rts,

#

I wouldnt care about tracing the attacks either

#

This is what i slashed at, so i hit it

faint pasture
#

You could tho, easily. Just don't make a ticking actor per unit, do it all in a big fat loop on a subsystem

runic terrace
#

In a Large RTS the units would only be visual

faint pasture
#

You lose perf not by doing a lot of work, but by spreading the work out in a million little functions and jumping all over the place.

runic terrace
#

The actual attacking/defending calculations would be done in a purely mathematical way with army strengths and sizes in the background

#

The attacking/moving animation etc would be visual

#

So you wouldn't have individual units running around attacking

faint pasture
#

I mean if you wanted it to, it all depends on the design. But modern computers could easily handle a couple thousand individually attacking units with their own stats. Just gotta be smart about it and make they system cache friendly.

cyan bone
runic terrace
#

A single empty object class would work fine

#

with just essential variables inside

cyan bone
#

never done an empty object bp

runic terrace
#

Yes, you could store a vector variable inside that represents its position, but it wouldn't really exist in the scene.
And you can have a single Actor class managing all the objects and drawing fake moving units in the world. Purely visual

#

When an attack needs to be done, just make a function that takes two army sizes and strengths etc, and determine a winner. Along with the remaining army size etc.

#

Then animate it visually, making it look like it's happening in real time.

cyan bone
#

Thats so outside of the box

#

So the single actor would be the one lerping all the units?

#

So this doesnt use squads

#

its unit by unit

runic terrace
#

Kind of yes, but the "units" wouldn't be real actors in the scene

#

But fake visual representations of the objects

cyan bone
#

They use VAT and LODs

#

Or thats not what you meant?

#

it seems its similar but your is more global

runic terrace
#

Yeah that's ideal, but in your case each of those squads are a character that contains its own code

#

If you were to add more squads it will eventaully slow the game down

cyan bone
#

I also found after testing that splitting them into squads rather than having them as one squad is cheaper

cyan bone
#

So i could create an object instead of an actor, right?

#

this is so confusing 🧠

faint pasture
#

I'd start by thinking about your game design and figuring out what you need

#

Is there such a thing as an individual unit or are they just graphics representing the state of a SQUAD

#

Do I care about doing hit tests for combat or is it effectively the same as in Civ

#

stuff like that

runic terrace
#

In your case you could probably get away with using an empty static mesh actor for the units, and use a single actor managing their positions

cyan bone
faint pasture
#

Is a unit fighting a unit or a squad fighting a squad? If it's just the graphics of dudes running up and hitting each other that's not pertinent to gameplay.

lilac flint
#

when i use my input for move and its do a flipbook, the flipbook is in loop how can i do for its do only 1 time

cyan bone
# faint pasture Does the combat really reflect that or is it just window dressing?

The combat would be calculated by other things behind the scenes, such as squad morale, proportion of the front line (has a reform function already), direction of the attack (flanking or direct). So numbers count but for now individual soldier health and hits dont count.
But you see if they reform then i need them walking around as individual soldiers, not like fake block squads where individual units cant move. They are block squads but i control the movement of each ISM when the situations where its needed.

cyan bone
faint pasture
#

That's a decision you gotta make. If the game can work just with rectangles bumping into each other, then do it. If you need individuals, then do that. It's a big choice and you have to make it early.

cyan bone
#

its just an illusion

faint pasture
#

If it's just an illusion then carry on as you are I'd say

runic terrace
#

I think Stellaris does what you want quite well

cyan bone
#

but spynorbays idea got me intrigued

runic terrace
faint pasture
#

Stellaris ships have individual stats and attacks tho

#

the individual ship is modeled

runic terrace
#

Each ship in that game is a unit with stats that does not exist in the real scene. But it has a visual representation in the scene.

#

That model is not the unit itself

#

just a fake visual model

#

that is animated

#

You can have fleets with hundreds of units but you won't see all of them, but it affects the combat stats

#

With each unit having its own stats

faint pasture
#

The ships are targetting each other individually tho. The combat model is ship on ship, analogous to unit on unit

cyan bone
#

i think im doing the opposite of that. Im having the representation of all the units, and i dont calculate anything of the particular unit, only the squad

#

but it looks like im calculating the unit combat

faint pasture
#

Yeah you effectively have a single entity with stats, not an aggregation of many

runic terrace
faint pasture
runic terrace
#

The "fleet" manages the visual representations of the units inside it

#

when the fleet moves, it manages every unit and updates their positions

#

But the units do not exist in the 3D scene, just in memory

#

a fake ship is drawn where their positions are by the "fleet"

cyan bone
#

thats what i dont understand

#

how do i make a unit appear in the 3d scene

#

without actually being there

runic terrace
#

Just make it have a Vector variable called position

#

it may only exist in memory but if it has a "position" variable you can update, you can draw a representation of it in the scene

cyan bone
#

in terms of UE

#

how would that be done

faint pasture
#

How you already are doing it

cyan bone
#

like instanced static meshes

faint pasture
#

Squad inspects self, draws ISMs where it should

runic terrace
#

Yeah you can use ism to represent that units

cyan bone
#

ok i see. so i think im doing that. or no?

#

because they are ISM

faint pasture
#

IDK you're the one with the code in front of you lol

#

you probably are

runic terrace
#

The one difference is on your code is your units don't have individual stats as far as I can tell

#

The squads do

cyan bone
#

yup and thats $$ cheaper?

faint pasture
#

who gives a fuck about cheaper lol

#

no difference

#

do what the game needs

#

if your game can effectively be a bunch of boxes on a strategic map, then keep doing what you're doing

faint pasture
#

if it can't, then you gotta reformulate

cyan bone
#

🙂 ok ok ill do it. im overthinking i see

faint pasture
#

You're doing the Civilization model right now, but a bit more complex. That can work fine, you just gotta keep the design in mind and have the Squad call the shots, not the units. The gameplay should be the exact same whether a squad has a bunch of little dudes running around or is just a box

#

If your game can work like this, you're good to go.

lyric rapids
#

how do i disable a function from being used

mental trellis
#

Remove it

faint pasture
lyric rapids
#

but its being called somewhere else but when something happens i want it to not be called

faint pasture
#

Something somewhere needs to make the decision not to have it do anything

cyan bone
faint pasture
#

That's like asking "How do I make my car not go"
Either don't press the gas, disconnect the gas pedal, or delete the car.

dawn gazelle
#

Or forget to fill the gas tank.

faint pasture
rich axle
#

I have a question about an architecture design problem.
We would like the ability to add some meta-information to any WidgetBlueprint (and inherited classes) that is accessible at Editor Time to do some Editor Runtime shenanigans. Is there an elegant way to extend them with something similar to a tag system for additional metadata?
Only Option I see to create my own UWidget class in C++ and make all of them inherit from that, but that feels clunky and unecessary. Any ideas?

faint pasture
#

What does this function do and WHEN do you want it to NOT do the thing?

lyric rapids
faint pasture
#

Whatever you have, you're probably doing something like
If I'm near a wall, run on wall

Change it to be like
If I'm near a wall, and my velocity length is > SomeNumber, run on wall

lyric rapids
#

No cause i want it to be when im on the wall and my velocity goes down

#

Not before

faint pasture
#

Then you need to be checking your velocity on tick

#

You can do it all in one place

#

Tick -> blahblahblah -> Branch on If NearWall and ButtonPressed? and Velocity > SomeNumber True -> WallRunning
False -> NotWallRunning

#

So if you're ever not near the wall or let go of the button or your velocity is too low, you'll not be wall running anymore.

lyric rapids
#

My wall run function is on a collison event tho not tick

faint pasture
#

Right now, how do you get out of wall running?

#

However you do that

sacred canyon
#

you use a tick event for checking the velocity anyway

lyric rapids
#

I have a end wall run function

faint pasture
#

ok so
Tick -> if Velocity < SomeNumber or OtherConditions -> EndWallRunning

lyric rapids
#

Thats what i did

faint pasture
#

ok so what's the problem

lyric rapids
#

But then it just recnonects and wall runs straight after whoch is why i wanna disable it until my velocity goes back ip

faint pasture
#

Well then you probably want some sort of a cooldown

lyric rapids
#

Yos

faint pasture
#

K so do that. On EndWallRunning, set some bool false, then reset it to true later. Check that bool when you try to StartWallRunning

lyric rapids
#

Ok ill try that cheers

faint pasture
#

Or save the game time as TimeStoppedWallRunning and make sure CurrentTime - TimeStoppedWallRunning is > SomeNumber before you can wallrun

glad coral
#

Guys i have a question,how can i make boat movement(boat should be controlled by the player)?

timid thunder
#

is the player getting into the boat

glad coral
limber parcel
#

make the boat a character lol

timid thunder
#

make the boat the character because it requires input from someone

gentle urchin
#

Boat pawn

glad coral
#

Btw im asking for the logic,not should the boat be pawn or character class,i've tried some stuff which doesn't work.

faint pasture
#

I'd use physics but you're not gonna just click button get boat, you're gonna have to do some work.

#

Start with getting a cube to float.

faint pasture
#

The general algorithm for anything physics movement is
Tick -> Apply Force -> Apply Torque (if wanted)

#

The calculation of the forces is what makes it behave boatlike or planelike or carlike or spherical cow in a vacuum like

sacred canyon
sacred canyon
#

wtf, I never saw all those options thanks

gentle urchin
#

Its an awesole node for sure

gentle urchin
real notch
#

I want to have a static mesh blueprint in my level that can do something when it gets clicked or tapped (mobile) on. What's the workflow here? Do I do a trace from the player pawn and then tell whatever I hit that it was selected? Or is there an easier way?

gentle urchin
#

OnTouched and OnClicked is usually avaliable

faint pasture
real notch
#

I want to have a static mesh blueprint in my level that can do something when it gets clicked or tapped (mobile) on.

#

Just something I can click/tap

faint pasture
#

Just make an actor bp and go nuts

real notch
#

But I don't know what nuts is :p

faint pasture
#

The way you worded it made it sound like you want to be able to just have the raw basic static mesh blueprints do things. That's another option, depending on the extent of what you're trying to do

faint pasture
real notch
#

As you can see, I went nuts

#

But clicking it does nothing

faint pasture
# real notch

You don't necessarily need to bind events, just implement the event

real notch
#

I don't know what that means

#

You mean this?

faint pasture
#

Select the component you want to be clicked, and you'll see a bunch of buttons to add events for it

#

On Hit, on clicked, on X, on y, etc

real notch
#

That's what I did

#

And it added that ☝️

cursive grove
#

How do games handle level progression? Do they use sublevels or loading different maps?

faint pasture
#

THey use any and all approaches

cursive grove
#

I want to create a leveling system but all there is on youtube is creating a map list with all the available maps. That's not modular

#

I want to be able to create maps and not having to add them manually to the list

real notch
#

Sounds like me last month lol

cursive grove
#

Should I try making an editor tool for the map list?

real notch
#

You'll have to either scan the database or just add the level to some list

faint pasture
#

You can hook up some way to watch a content folder

#

such that
ListOfLevels = All Levels in /Levels/
etc

cursive grove
#

So I mean how do people do this, when having different worlds

#

with levels in each

real notch
#

Worlds with levels is just multiple levels. Or do you mean levels loaded into levels?

cyan birch
# cursive grove How do games handle level progression? Do they use sublevels or loading differen...

In my experience, sublevels are often used for optimization and compartmentalization of work so you'll have a level broken down into sections, and each section gets a sublevel so several people can work at the same time and the sublevels can be streamed out when not needed.

Different levels are used when a hard-load (not streaming) is acceptable, like between interior and exteriors in an open world game, or when a major shift in setting occurs in a more linear game.

faint pasture
#

@real notch

real notch
junior hedge
#

Wait do a need a collision capsule to make an overlap event without actually having to be inside the object?

cursive grove
faint pasture
#

Make sure click events are enabled and the mesh collision blocks visibility i think?

real notch
#

It generates overlap events

cursive grove
#

There's also overlappall

faint pasture
#

make sure the player controller is generating click events

#

you have a cursor right?

real notch
#

I do have a cursor yes

real notch
#

Oooh actually

#

Could it be that my ui canvas thingy is in the way?

#

It's set to not hit-testable

faint pasture
#

Ya I dunno, I've never used click events. But once you get it working you should be good to go

real notch
#

:p

cursive grove
faint pasture
cyan birch
#

It's honestly really up to you, whatever organization is best for your workflow and gameplay.

cursive grove
#

I'm trying to understand it before I build it, sorry 😅 Maybe it's common sense to you

faint pasture
#

Stuff like that more comes into play when 10 people are working on a level

cyan birch
#

But yes, like that haha. As long as World02 is another persistent level, that's the type of organization I have been seeing.

cursive grove
faint pasture
#

And I think World Partition throws a whole other monkey wrench into the setup

cyan birch
#

If you're in UE5 data layers is another thing to consider, they effectively replace sublevels.

cursive grove
#

nah, it's more like this type of levels

#

contained

faint pasture
#

We are going for a zero load screen approach for our game, but it's procgen so the actual level on disk is basically a sun/sky and that's it

#

If anyone has any thoughts on how to approach joining a session without a hard cut / load screen I'm all ears

#

For the host it's completely seamless from startup to shutdown. But a joining client has to have a hard load on their screen

cursive grove
#

So all of the sublevels get loaded initially? Then I'll just be changing the visibility?

faint pasture
#

like photoshop layers

#

If you're going for a level based game like Mario or Bomberman or something of that sort

cursive grove
faint pasture
#

multiplayer joining always happens at an identical area (like the town in Diablo)

#

so if you could just.... appear. That'd be incredible

dry condor
#

i think it could lead to weird effects when you dont have a transition screen. like stuff vanishing around you because its been destroyed in the hosts world or w/e

faint pasture
#

Basically it's like the Diablo Town <-> Dungeon loop, except when you're in town, you can join your buddy's town and go dungeoning with them

#

we have a teleport mechanic so that could cover it. Sort of like the portals in diablo

#

but I want it to be 100% consistent where there's no difference between teleporting to dungeon or teleporting to another person's base, so I have to work on that transition

#

Basically town = spaceship, dungeon = surface, you teleport to surface and back, and can teleport to another ship (joining a MP game)

cursive grove
#

You can try having mouse over action to load a small area around the teleport the player is going to go 😛

faint pasture
#

Beam me up/down/sideways scotty

cursive grove
#

Or add a teleport animation to give it time to load

faint pasture
#

so you quite literally do teleport to the surface, the ship still exists way up above you

#

so the act of loading/generating a new map is the ship flying around. Then once the map is ready (it's like 2km beneath you), you can TP to it

cursive grove
#

And you want to be able to teleport from the surface to the underground without fading? Like a hard cut that shows the camera travelling to the ground and you appearing there?

#

aah

#

well, no idea 😛

faint pasture
#

Maybe we'll have some fullscreen effect sort of simulating the disorientation of teleporting

#

It'd be easier to sell if it was a 1st person game

cursive grove
#

Why not just use particles as a VFX to split the player and reassemble them down?

#

and motion blur or something

mortal cradle
#

I need around 100 entries which consist of a name and a texture 2d, what is better performance wise, using a map variable or creating a data table?

lyric rapids
#

So i have a event that detects on collision how would i detect if i was colliding with two different things at once

faint pasture
#

Do you need to index into it all the time?

#

Does it need to be replicated?

normal raft
#

I've been trying to implement Tom Loomen/Fortnite Save the World style hitmasks for skeletal meshes and have the material logic mostly done, however I've been struggling to transform the world space hit location into reference bone space. (Image is the closest I've gotten to it working)

gentle urchin
lyric rapids
mortal cradle
#

@faint pasture 3x no

#

It's just for input remapping and depending which key the player presses the texture is gonna get chosen from either a map or a data table

ornate trail
#

you can get acceleration from character > movement component but not from pawn > get movement component? Seems it should be in the base pawn

faint pasture
#

and there are many movementcomponents of which CharacterMovementComponent is just a subclass

gritty plover
#

Hey, anybody know how I can disable Ctrl+mouseclick to move objects in the viewport? I can't find it in the project or engine settings

cursive grove
#

Why does my level spawn another character on play?

gritty plover
#

@cursive grove Do you have the character set to auto possess?

cursive grove
#

Ah nevermind, forgot the game mode

shadow field
#

anyone know how to change the pose of a mesh, the base skeletal mesh is set as an A-pose but the skeletal mesh is set to the T-Pose

gentle urchin
#

I guess at the end of the day its always simulation but. ...

#

So the joining player wouldnt actually join the server

faint pasture
#

That'd be overkill

gentle urchin
#

I guess so

hazy fulcrum
#

Does anybody know why a blueprint wouldn't read a component's relative rotation correctly? I'm trying to set it via a timeline and for some reason it'll set the rotation correctly but won't read the new rotation correctly when I try to play the same timeline in reverse.

#

Blueprint for context.

#

If I call the OpenDoor event it correctly rotates the door to 0,0,127 over the length of the track, but when I call the CloseDoor event, the door instantly snaps back to 0,0,0 as it's reading the relative rotation as having not changed, despite the fact I can see the new rotation in the details panel of the co,mponent in the scene.

reef crypt
# gentle urchin Yes, you could do that

hey man was out so i never got to get back to you on this one. i was able to create the new class blueprint (Class_Random) and change the parent actor to be the BP_Pickup so I could select it just like all the others. i wasn't sure as to how to randomize it from the other classes with an array. this is just what i tried doing after looking up some tutorials and got an error with spawn transform, i wanted to at least try something before asking again. there are two blanks and an extra pin to the battery cause that's the simplest way i could think of adding probability of one spawning over the other.

dawn gazelle
viscid arrow
#

can you use damage types classes to affect character movement components i.e hitting a enemy causes them to move slower?

viscid arrow
#

nice

#

can i affect the movement component directly or will that cause issues?

faint pasture
viscid arrow
#

a slow effect

#

you get hit with a ice bolt and you move slower for 3 secs

faint pasture
#

So you'll want the concept of a resettable buff with duration

#

Is this multiplayer?

viscid arrow
#

correct

viscid arrow
faint pasture
#

So your first thought might be something like
Damage - update speed - delay - update speed

#

That won't work because that happens when you get hit again before duration is done.

#

So your second draft might look like BuffActors

viscid arrow
#

that attach to the hit actor?

faint pasture
#

Which are just actors with a TargetCharacter variable and other stuff, which have Apply and UnApply events, and destroy themselves when their duration is up

faint pasture
#

Buffs can get really complex really fast. I'd start with BuffActors tho

viscid arrow
#

ok

faint pasture
#

The endgame would look something like GAS but that might be overkill for single player.

viscid arrow
#

Thanks for your input

faint pasture
#

Make a BuffActor base class then you'd subclass it for slow, stun, dot, etc

#

I'd do it like

#

Buffactor:
Actor/Character/YourCharacter TargetCharacter
float Duration
float Tickrate?

Event OnApply
Event OnRemove
Event Tick/BuffTick

#

So a slow might look like
OnApply -> Target.Speed -= 100
OnRemove -> Target.Speed +=100

viscid arrow
#

i'll try to implement it, i'll let you know if im stuck, thanks a lot

nimble talon
#

Hey, I have a problem with all widgets in my project

Text on them Won't update (The same BP works in other projects)

Someone Help?

tight schooner
# hazy fulcrum If I call the OpenDoor event it correctly rotates the door to 0,0,127 over the l...

You're using its rotation as part of a lerp calculation that also sets the rotation. So on every frame the A or B value going into the lerp is changing, and therefore the timeline lerp doesn't work the way you expect.

A lerp works best when you give it two unchanging values. One way to approach that is to store the initial rotation into a variable before running the timeline so that the alpha value can sensibly interpolate between two rock solid rotations. Otherwise you've accidentally made an "RInterpTo" ticking event with a timeline.

broken wadi
tribal compass
#

oops

broken wadi
#

You'll probably get an answer if you ask over there

tribal compass
#

ty

trim matrix
#

why are widgets so painful

#

As of now, every time a new icon widget is created it should be added to this array, and print the length and index number.

#

every time you call and spawn an item this is ran, it should remove the most recent index correct? But it does not.

#

Something else I noticed is that it runs and returns hello as many times as there are items/icons

#

if I have one item, and I spawn that item then collect it again, it adds another icon widget which tells me when I spawn the initial item its not deleting that icon from the index

#

It's like adding ghost icons

tight schooner
#

so what you might want to do is manage your own array

trim matrix
#

How do I change variables inside a struct thats inside an array of structs without removing the whole struct

tight schooner
#

not sure if that works

#

if not, maybe make some function that does the work on a local copy of that struct in the array, then sets that array element (as ref) with the local copy.

mortal cradle
#

Is it possible to get the name of the pressed modifier key? I have no problem of getting a display name of standard keys like "W", "S" etc but modifier keys just show blank.

trim matrix
#

I tried that at first, doesn't seem to change anything.

tight schooner
#

@trim matrix It seems like there are multiple issues. First of all you're seeing very many Hello-s so your execution isn't working the way you think it is. (Couldn't tell you what's wrong but it seems like removeIcon is being called many times).

Second of all I'm not sure what you're trying to do. Is there only one Inventory widget on the screen? I see you're trying to remove index 0 of the Found Widgets array. You're trying to destroy the first-found Inventory widget?

#

Or did you mean to remove something from the Inventory widget's Icons array?

astral epoch
#

Is there a node for setting hierarchy in the outliner?
Apparently setting owner is meant to do this but all my characters being spawned are still not being listed under the object I'm setting as their parent.

#

Not for any gameplay purpose but it makes testing a bit more difficult when I have to scroll through countless character instances that I don't need to see.

ornate trail
#

what is that small purple line between the nodes mean?

tight schooner
trim matrix
#

every time you collect an item the inventory widget adds a new icon for that specific item and creates an index for it.

tight schooner
#

makes sense so far...

trim matrix
#

So when the player spawns the last item, it should get the last index, and remove that widget icon.

tight schooner
#

I don't know/trust UE's widgets in terms of how they're destroyed and removed from arrays, so here's how I would tackle this in a catch-all manner...

Make a new function cuz we're going to use a "local variable"; this'll basically replace the removeIcon event. In the function, get a ref to your inventory widget; if Get All Widgets of Class works then may as well keep doing what you're doing.

Get the icons array from your inventory widget. Get the last index element and then save the output of that getter into a new local variable. (Right click on pin and "save as new local...")

Remove the last index from the Icons array, NOT the Found Widgets array.

Get your local variable and remove from parent. That's the whole function

trim matrix
#

Okay I will try that, but this is basically what I want. The same order the items are picked up, then cycled out of the player, I want the icons to be removed accordingly. That's literally all Im trying to achieve

rancid quartz
#

Hello, I have a question about Game User Settings.

While setting the scalability settings of the game via direct console command functions as expected, calling ChangeScalability, GetGameUserSettings, and ApplySettings on a button click seems to permanently freeze the editor.

Does anyone know what might cause a crash like this will using ApplySettings? Any advice would be appreciated.

Cheers.

trim matrix
#

@tight schooner is this what you mean?

tight schooner
plucky dawn
#

In C++ there's a function inherited from UObject called PostEditChangeProperty that is called when a property on the object is modified externally. Is there anyway to write a BP function with the same behavior?

faint pasture
plucky dawn
#

Or, more explicitly, I want to set a variable on the Details panel on a BP and have other variables to update their value when this happens.

hazy fulcrum
trim matrix
faint pasture
#

You could even do Lambo doors like that

trim matrix
#

Im making a script that when an npc goes to a certain place in the overland map, it logs the NPC's data and sets the location map name to the GoTo var name inside the NPC data, and checks the NPC data's Arrived? boolean as well. so when I enter the scene I have an actor that looks for all NPCs stored inside the game instance that have the same GoTo name as the current map named and that have Arrived? ticked to true. It spawns the an npc but i get this error

trim matrix
#

inside the spawn point actor bp

#

I have a debug so when I click my actor it displays his info. the spawned NPC in the scene has the same info as the npc that travelled to the location in the world map so that works i think..

trim matrix
hearty barn
#

can you stop and then restart a projectile simulation movement? I want to be able to freeze the movement and then start it back up after

trim matrix
#

it only spawns one npc too not as many NPCs that have the arrived? set to true and the same GoTo name

hearty barn
#

or better yet if I could turn off the stop simulating after one hit for this particular projectile

trim matrix
#

The spawn point actor grabs the game instance and checks how many actors have a matching GoTo var as the level name, AND the arrived checked to true. its supposed to spawn as many NPCs as that but its only spawning one

faint pasture
plucky dawn
trim matrix
viscid arrow
faint pasture
cedar sparrow
#

how would i convert an actor's local location into world location?

viscid arrow
#

i have the damage type actor add the "frozen effect" (enum that attaches "effect actor" to the hit enemy) this is done via interface so i dont really know how to implement it

faint pasture
#

an actor's local location is always 0,0,0

#

by definition

#

or do you mean a components local location

faint pasture
#

enum that attaches an actor to a character?

#

that doesn't make sense

viscid arrow
cedar sparrow
# faint pasture or do you mean a components local location

I meant I need the world location of an actor's local location. So if the actor is a plane in this case with dimensions 100x100, the center would Locally be 50,50. I want to know what that 50,50 is in world space, not in the actor's local space. Does that make sense

night bear
#

Why doesnt this work?

reef crypt
# dawn gazelle You can have a class array, and just use the "Random" node to pull one. Require...

hey so I was able to create the class array and added the random node as so, but i still spawn this gray ball. i tried doing this so as to maybe destroy the actor and then spawn a new one in its place, but im not sure how to go about it. i'm not sure if im approaching this correctly. i have placed the battery and flashlight on the table and wanted to add another random item (between another battery, ammo, or nothing) for reference, the third screenshot shows how im selecting them and was trying to see if it was possible for this random class to just pick another of the other classes i specified in the class array in the previous screenshot.

tight schooner
#

when you saw your Hello print node on the screen several times mysteriously? No part of the function itself removed all icons. I still suspect you have another issue happening elsewhere

faint pasture
#

Either way, the general way to convert from local to world is TransformLocation

#

using the actor transform

#

Either that or InverseTransformLocation, one of them

faint pasture
#

Or rather, spawn the buff actor, telling it who its target is, and it does the attachment etc

viscid arrow
#

that would be more efficient

#

thanks

faint pasture
#

Like say you had a fireball.
Event Hit -> Cast to Character (or do interface call) -> Spawn OnFireBuff(BuffTarget = HitTarget)

viscid arrow
#

thanks

plucky pasture
#

Anyone know how I am suppose to use Get Game world? The top one is deprecated in UE5 and I am not familiar with Unreal Editor Subsystem. I am trying to reference the level I am in from an Editor Utility Widget

faint pasture
#

If that worked then you'd InverseTransformLocation to go from world to local (projection etc)

gentle urchin
#

World loc of component is local of comp + world of actor is it not

#

And world to local is just the reverse

#

Remove the actors world loc from the transform, and you're at the local..

trim matrix
#

Why am i getting this error

#

this only happens when more than one NPC is viable for the for each loop

#

nvm fixed it

faint pasture
#

10,0,0 local in an actor at 10,0,0 world with rotation 0,0,90 is 10,10,0 world, not 20,0,0

gilded venture
#

Yo! So I'm making a top-down 2d game, and would like to nix any velocity not associated w/ current movement directions. Anyone know of a clean method to do this?

#

I.E., Player holds right against a wall, colliding against it. They can tap up or down, and now will slide the length of the wall because some amount of that velocity isn't nixed

#

tl;dr wanna kill that "slidey" vibe

faint badge
faint pasture
#

Can the character otherwise move diagonally?

gilded venture
#

so, here's the missing piece-- I'm only tapping up or down

#

briefly, very briefly, as you can see by how quickly the velocity changes

#

but it will maintain some amount in that direction despite having no input saying to

#

I have no issue w/ them "sliding" if the player is inputting for that, but this is an instance where they aren't

faint pasture
#

@gilded ventureI'd try tune it with friction etc

gilded venture
#

Yeah, already been through all of the settings unfortunately

faint pasture
#

Dig around in the CMC settings, assuming you're using the CMC

#

Turn your acceleration up

#

or braking acceleration rather

gilded venture
#

lol it's at 9000

#

I promise u, I've taken the sane approach here

faint pasture
#

You using analog stick or WASD/Gamepad?

gilded venture
#

this is WASD

#

The root of the issue is that the character class comes w/ a capsule that cannot be changed

faint pasture
#

This is a capsule vs a perfectly flat wall right?

gilded venture
#

Correct. But 3d engines have collision that works via repulsion.

#

When you have a circular object collide with a flat object and some impulse is added on a non-restricted axis, this occurs

faint pasture
#

Are you saying it slides FURTHER than you would move if you were just standing out in the open and tapped up or down?

gilded venture
#

yes lmao

faint pasture
#

That's pretty weird

gilded venture
#

this is literally tapping the W or S key for a fraction of a second

#

the only thing I can think of is manually overriding the physics but it seems hacky

tight schooner
#

Prolly make your own pawn with custom movement at this point

#

Given that you're going for SNES levels of physics it can't be that complicated...

gilded venture
#

lol you'd think

#

ideally I'd just add a second collider to the CMC but UE4 does not like that

faint pasture
#

@gilded ventureI can't reproduce, what are your walk speed and acceleration settings and capsule size

#

I just tried walking into a wall and tapping and no sliding here

gilded venture
#

capsule is a radius of 6, but I'm using flying movement

faint pasture
#

That's probably it, flying movement is dumpster tier

#

flying movement component or cmc in flying mode?

gilded venture
#

cmc in flying

faint pasture
#

any particular reason why flying?

gilded venture
#

When I started the project, I was told that for top-down projects flying was the standard due to issues w/ walking on the Z axis

faint pasture
#

Ya i can reproduce it with flying movement mode

#

looks like flying tries to coast with any input

#

Why not just walk in XY and have camera view from above?

#

Anyway, it's the flying mode's momentum conservation that's doing this. I'd either

  1. Walk and have game field be in XY like a normal person
  2. Override Flying math
  3. Make a custom movement mode
  4. Do your own movement, it's not that complicated for what you're doing

I'd do either 1 or 4

quasi vault
#

I have a quick question, I was following this tutorial about a side scroller and wanted to branch off and add a crouch mechanic

#

But I can’t seem to figure it out, does anyone know how to do it? I’m still messing around in the blue print tying to make it work

faint pasture
#

It shrinks the capsule, you just need to hook your animation into the crouch boolean or whatever and you're off to the races.

quasi vault
#

Correct me if I’m wrong, I think your referring to the “is crouching” node, I found it but I don’t know how to associate the animation to the crouching

faint pasture
#

read IsCrouching, change state machine with it.

#

Look at the 3rd person template. At least the old mannequin had a good simple AnimBP

quasi vault
#

I got it to work, but after releasing the crouch button the character remains crouched

faint pasture
quasi vault
#

I put the node “un crouch”

faint pasture
#

ok, so how are you doing your crouch animation?

quasi vault
#

Before continuing, the is 2D. The crouch animation is set through a “select node” that is if “is crouched” is true it plays the flip book animation, if it’s false then it connects to set flip book to be run on tick

acoustic wing
#

does anyone know of a really simple way to make Ai attack and deal damage ?

tawdry surge
#

On hit-> apply damage
Or on overlap-> apply damage

#

On hit you'll want a delay or something

On overlap you'll want to trigger a timer to cause damage periodically while overlapped

acoustic wing
tawdry surge
#

Not atm. Im not at my pc
On hit and on overlap are overrideable events for every Collison/mesh component

#

You can find them in details

acoustic wing
#

i am not really sure how to do that i am still very new to unreal engine :/

iron bone
#

anyone know why my imported fbx is having these weird spots in the preview?

copper steppe
foggy otter
#

hey guys so im having a weird issue where i cant add to an array in another object. basically, i created a barebones object class (not actor), that just has one variable which is an array of vectors. now in an actor im creating that object and trying to add things to that array but when i check it later its always empty, no matter if i used add or set to put things in there. whats going on here?

#

the variable is public and instance editable