#blueprint
402296 messages Ā· Page 921 of 403
Like whether a switch is on/off, etc. Boolean.
I've heard it's generally difficult to save boolean variables?
Not true at all.
I was more wondering what the variable represents, rather than its type.
Oh yeah, just like I have a system where there's doors that open if a certain amount of switches are on.
I'm looking at tutorials on save systems but they're all talking about things such as saving a players health/location, etc.
Which I also want to do but I also want it to keep track of and save which switches are on and which are off.
is there a way I can detect if like half of a boolean map is false?
Count them
Get all values, count the true ones
ah, is that with the Find thing
I think you can just get values as an array
theres this thing
Got a really basic question.
How can I "extract" a variable out of the event like that
Set a variable to its value
On a side note, there is a global getter for delta time. Can't remember the exact name.
Get World Delta Seconds?
Though that'll affected by time dilation
So is the delta from an event though. Same number.
In this exact cast the delta is from inside the function actually, so you apparently can just call those variables out of anywhere
Not sure if anyone gave a proper answer but there's an option that's something like "Make event a function" and then you can get the parameters as local variables
Also fun note on that for tick. Making tick a function rather than an event gives an insignificant performance boost.
how do I AddImpulseAtLocation to an array of components if it only accepts one?
Loop through them
Can someone help me with a methodology question? I need to trace the normals of several polygons in a certain location. I looked into using a sphere trace to accomplish this but from my initial reading of the documentation, I dont seem to be able to accomplish this. What should I be doing in order to accomplish this?
What do you mean by "trace the normals"? Do you have the polygons available already?
What are you trying to do.
yes. So when I do a line trace towards a polygon, I can get the normal of that polygon. I would like to do this with multiple polygons and take the average
the switch itself can be an actor that has the on/off bool
Line trace towards multiple polygons
Do you already have the polygons or are you discovering them through the line trace?
What's the mechanic, average the normal for the ground under a vehicle or something?
but I'm using it for procedural foot placement
oh
wow
I thought that'd have a preformance impact
yeah something like that
Yeah just do 4 in a rectangle and call it a day. This seems a bit excessive though, it's pretty rare that you'd have the average of the 4 NOT be what a trace vs the center is
but I'd not use the polygon normal average, instead generate a normal by 3-4 traces
line traces aren't very heavy then? So I sort of scan for other ones using a for loop or something and add them to an array
thee reasonm I'm doing this is because I want my charcter toi be able to walk on walls and other surfaces
So how often is the average of 4 traces NOT just the normal of the wall at the center of the traces?
I'd start there and then refine later. You might get some literal edge cases but it's not noticable. Pretty much nobody is going that crazy with IK
If I was to do that, I'd do 3 traces (Big toe, little toe, heel) and generate a normal based on that triangle for the foot orientation
that sounds perfect, thank you for the help!
can someone help me please?
How do I make a sphere detect a static mesh when overlapping?
I feel like I should know this but im haviong trouble with t
give it a collision box or sphere
I did give it a collision sphere
but i dont want it to detect an actor, just a static mesh
Everything in the game world is an actor.
"All the world's a stage"
sometimes where you expect them to be, sometimes not^
is there a way i can change navigation area ontop of a static mesh ?
What's up with this editor script bugging out? When I go to refresh it, it just collapses this node, giving me no inputs - this worked flawlessly for years, did they remove this functionality somehow?
the function may have changed? would try to add a new call
or your editor is borked for some reason
it's both client editors too, not just one -
that's a victory plugin but I know this should work natively
indeed, is that in a blueprint function library or widget?
and that worked before? (i don't have enough experience with them to help further, tho)
yeah, no problems at all
but spawn sounds somehow wrong
you might want to construct an object from class, and add it to the level
Heya all - got a question; is it possible to async load the same asset twice? (Or to prevent that from happening?)
I am leveraging data tables with soft references to animations, and based on certain conditions, I am async loading a group of animations and storing their primary asset ids in an array. Later on at some point, if need be, I could then unload based on the primary asset ID and clear out that array. That part should be fairly straight forward.
What my challenge at the moment now is, if someone wants to perform an action (which at the moment, retrieves a soft object reference from the data table), what would be the best way to play that animation (and multicast it). Am I just able to take the soft object reference and connect it to a hard reference or do I need to specifically match that primary asset ID somehow (so like matching animation name to the name stored as a variable when I did my async load)?
I guess my stupid question is. If I async load a set of animations (or montages) in bulk. How do I reference them later to actually run that animation, short of literally saving each one into an array on my character (or is that the most efficient way to do it - clearing out the array any time I need to unload my animations)?
I know Lyra does the ABP animation layers bit - but unfortunately, my set up doesn't seem to cooperate too well with me pulling Lyra stuff out and into my project separate from that.
In C++ that would be filled with GetOuter()
This is weird - I was able before to spawn an actor in class in the editor utility
basically procedurally spawning items in a level BEFORE runtime
but this
says otherwise - there's no option for it listed
I feel like I did something similar with a spawner. Though I didn't bother with the complexity of having to keep the primary asset alive. I find you generally don't need to worry about that level of complexity for most things. In my case basically the spawner took in soft refs and counts. But I needed to be able to spawn several different types at once. So I put the softref in a map of classtype/count. Then checked if the softref was loaded, if yes spawn immediately. Else I called the async loading on all of the necessary classes. When the callback ran for the async loading, I get the returned class, and found it in the softref map to get how many spawns I needed and spawned that class.
So. In relation to Animations, I feel like it depends. Most animations don't need to be softreffed. If we're talking like punching versus shooting versus other tool animations, those would be hard reffed in the tool itself and only loaded when the tool is. But for like an emote wheel, there's no need to save state. You simply play the latest requested animation in most cases. All other more common animations should be generally hard reffed in the anim bp. SoftRef only when you have many things that could potentially never get used in normal gameplay and let assets hardref their required animations. then only the asset requiring the anim needs to be softreffed, which also gets you soft reffed mats, meshes and everything else.
that's a concept I'm not familiar with
Tbh I have yet to see a cut to the chase explanation of Outers
Well I appreciate the brevity lol
I guess it's difficult to explain about Outers in one lift ride.
If you wanted to spawn an actor into the level BEFORE runtime, HOW would you do it then? Currently (ue4)
Yeah, that is a fair assessment. I feel like in my case, I'd still need to have some means of cleanly grabbing it and unfortunately I do have a large pool of animations. I have movement styles and then actions that fall into each grouping. Which I have based on what the player is currently wielding - Unarmed (in both hands) has a different movement style but may share some attacks with someone using a weapon in main hand and unarmed in their off hand.
To have it make sense, I created two groupings (Movement, Actions) to allow for me to mix/match the appropriate animations for each. Then for even more dynamism (or insanity lol) I actually have my actions separated out by Hand and Stage (think of it as a combo counter). So I may have 4 unarmed MH punches for the first attack, 3 for the second, and 4 for the third (final) attack of a combo. Just the same, I may have that same amount for OH punches. And a character with a dagger in their MH will use dagger attacks but occassionally, it'll blend in some of their offhand punches as well. I have these groupings randomly selected (and adjusted my animations to make sure they fluidly work with one another). It makes combat honestly look and feel GREAT because it is not very repetitive - but given that I am also doing a multiplayer focused development, I need to be mindful on what way am I handling my resources.
I think you are right tho, maybe I should just hard ref the animations (into an array variable) once I load them - call them freely as I need to (via my matching/randomization bit) and then just unload them when they are no longer needed, and call it a day. All of my meshes/textures/etc are soft loaded as is which def helps mitigate on that side.
I mean - if I really think about it, that kind of is what Lyra is doing. The animation instances have hard coded in each animation in its respective category and just calls the referenced variable. So depending on which animation instance is loaded, the animation there is different, but the variable name remains the same
Hello, I am creating a Function that will take in default param values and Spawn an Actor from class.
This works when I make the Function within a BP. But I also have a Func Lib which I use to do much of my data processing. However when I try to make a similar function there, Spawn Actor From Class is not an available node. How come?
Is there a way to get a light to skip a single object? I want this datapad to cast light around it from the screen, but its screen wouldn't cast light on itself like that.
You on UE5?
Not yet.
Why not just use emissive and let Lumen do the work
ah. Anyway, I'd have an emissive screen and a very slight light from it
if it's emissive unlit then you're golden, it doesn't get lit anyway
Shit I should probably get UE5 though...
also it shouldn't be a point light, but probably a rect light or spot light
What's a rect light?
Rectangular in which direction though? Is like a point light but a box? or like a spot light but it projects a rectangle?
At a minimum I'd have a 160-180 deg spot light instead of a point light for the screen lighting
Spot light rectangle
like a fluorescent fixture in an office
But try the emissive screen + weak point/spot light approach first, and put the light like 1cm off the screen
I have a simple capsule collision around player that is supposed to push every object it touches away without slowing player, collision config is shown on the picture below. Its simple and works like it should, the only problem is that when 2 players collide both of them instantly stop but I would like them to push each other away just like when pushing random objects on the map. It is possible to do with some setup in the editor or its needed to make some add force logic on touch?
I asked this yesterday, but didn't get much of a response as far as I'm aware. I have a newly created character controller bp, and it's serving as my player character. When I press W to move it, it will not move. It's affected by gravity, and I have the W key bound to an axis event with a scale of 1. This is my code, the physics/collision options being applied, and the outliner of the character:
the level you want to place the actor in
What happened to the world context pin? you used to have to use it ?
maybe this is deprecated somehow?
JFC - I hate you epic
Mar '21
Find plugin āEditor Scripting Utilitiesā.
When upgrade project, it can be disabled for unknown reason.
I upgraded like 6 months ago but hadn't need to even open these blueprints, that
So yeah, check plugins - even if it is an engine plugin
So, I have two blueprints. Both have the same functionality: If the player enters the collision zone, the object will drift toward the player.
BP_FollowingObject inherits from StaticMeshActor and includes its event graph, a Static Mesh Component, and a sphere collider.
**BP_FollowingScript **inherits from ActorComponent, so it includes only its event graph.
My goal in creating BP_FollowingScript was to be able to add this component script to any object with a collider, giving it the player-following behavior. This currently works.
In contrast, BP_FollowingObject has that behavior tied to its included components, so it's more in line with how I would do it if this was just a one-off object that needed this behavior.
If you watch the attached video, you can see the issue I'm currently trying to solve. The white cubes and the blue cubes have identical parameters, except that the white cubes are objects that have had BP_FollowingScript added as a component, while the blue cubes are simply instances of BP_FollowingObject (which has a blue cube static mesh component).
The **BP_FollowingObject **cubes do exactly what I would hope - They respond to physics when bumped into by the player and they collide with each other instead of merging together, all while happily drifting towards the player while they're in the detection zone.
The BP_FollowingScript cubes drift towards the player when within the detection zone, but they can't be pushed around by the player through physics and the cubes all intersect each other while approaching the player. When you leave their detection zone, physics takes over and they shunt out forcefully.
I know the obvious solution is 'just use BP_FollowingObject if it does what you want it to do', but I'm really just trying to learn what is/isn't possible. The flexibility of adding behaviors to any actor through component scripts is appealing compared to creating pre-canned blueprinted actors with those behaviors.
Any insight? š
oh, so that plugin adds the spawn actor function which you where missing?
Get Forward Vector returns a value between -1 and 1 for each part of the vector (x, y, z). If your axis value is also between -1 and 1, that means at most, you're requesting your actor to move 1 unit, or 1mm, per tick. So even at 60fps, that's only 60mm per second.
You'll want to take the axis value and multiply it by some value for how much movement you want and plug that multiplied value into your scale value - Try out a variety of values, but try with something between 600 and 1200 first.
That comes down to your colliders collision settings
Is there a way to run AddMovementInput without having Max Acceleration under Character (need Velocity speed, not Acceleration)? Currently I'm unable to achieve that.
That's what I thought too, but I checked the settings between the white and blue cubes and they're all perfectly identical. In fact, if the event graph behavior on BP_FollowingObject is deleted and I add a BP_FollowingScript component to that static mesh within that blueprint, all of the nice collision behavior is lost, despite it using the same mesh it was using previously, just with the component driving it instead of the top-level event graph of the blueprint driving it.
Show your code for the two movement implementations
Both blueprints are visible in their entirety in my original post above, but if I missed anything there let me know!
I feel like it might relate to the fact that FollowingScript performs the movement behavior on the Actor Component owner of the script, whereas FollowingObject is able to perform the movement on itself. But I'm not sure how to reach higher up from FollowingScript to perform it at that same level, if setting the position of the actor component is somehow skipping physics compared to the alternative.
Guys can i use different game modes for different levels?
I am working on a game and i want to switch game modes between different levels how can i do it using blueprint ?
I am stuck since morning ;_;
Normally you just specify the game mode in the level itself.
If anyone could help with this it would be greatly appreciate i have been trying for a few days now to figure something out and i just cant figure out a formula to do what im wanting, its probably more of a math question if anything but dont see a section for that, but basically i have an object that is looping, its moving between a current pos and a new pos, i am spawning objects along the path, im using a delay to spawn them and wanting to change the spawn delay depending on the distance, for example i was trying to divide the distance by 1000 to get a small decimal point such as .2 and it would spawn them every .2 seconds, but if distance is further it would for example be .5 and spawn every .5 seconds but i want the opposite effect and just cant wrap my mind around it
yea if you just go to world settings tab in the level you can get the gamemode override there
You can use a map range or map range clamped node. This will convert a value range to another different value range. So you can say have a value between 0 and 1000 and convert it to a value between 1 and 0.2 - so if you input 0, 1 would come out, and if you input 1000, 0.2 would come out. The clamp version makes it so only the intended min and max of the "B" values will be used in case the number goes higher or lower than the defined values.
Are they simulating physics too?
I see nothing in your code that would make them respect any sort of collision
Does anyone else's blueprints randomly stop working? Like they'll load up UE and some code decides to not work anymore lol
That doesn't happen for no reason
Either it never worked, or you changed something in C++ which caused them to break
Or hotreload
Yeah, the physics settings are identical on the blue and white cubes, along with every other possible parameter. I was just talking to the devs on my team about the issue and they were stumped as well, but they did say maybe I'm moving it in a way that fundamentally won't respect physics (which seems true on FollowingScript, but not true on FollowingObject, despite them being the same movement logic).
You have a bigger problem, which is that you are using physics AND just directly setting location.
You have 2 mechanisms for movement.
Choose one
If you're wanting to use physics, make the boxes chase by using physics i.e. apply forces
That does make sense. I truly wonder why it functions as-desired already for the FollowingObject version, since they are using those two mechanisms happily in tandem, but I see the logic you're describing.
Might be a tick order thing but that's just a happy accident. What you have is like Mario Kart and Gran Turismo movement mechanics both applying on the same car.
Turn off physics and they should both behave identically
Maybe FollowingObject is applying the motion to the scene transform while FollowingScript is only touching the component transform, and the scene one's order of operations works with the physics
You're calling the exact same node (Set Actor Location) in both cases.
Is the actor heirarchy the exact same in both? Just the one scene component (the mesh)?
It's the "Target is Actor Component" part of Get Owner that gives me pause, where the non-script one's target is able to just be 'self'
Because self is an actor component
"Give my my owning actor's location"
Components are owned by actors
Actor Location = Actor's root component's location
So the FollowingObject only having 'Target is Actor' here vs being fed 'Target is Actor Component' in the script version doesn't make a difference?
Those should be the same, assuming the actor scene heirarchy is the same. You haven't showed us them.
Here are their respective object hierarchies
While here they all are in the scene, just sitting at the root level
Yeah probably a tick order thing or something of the sort, assuming that StaticMeshActor doesn't do anything non-default to its StaticMeshComponent
Anyway, I'd just fix it to either use physics or not, not both physics and kinematics
One could be in a post physics tick group vs pre physics, who knows
But what you have right now is basically constantly overriding the position that the physics engine is calculating
ooo ty š ill look into this after dinner i appreciate it!
Yeah, I agree on both accounts. I did check the physics tick of the blue ones and it made no difference where in the tick I placed them (pre, during, post), they still worked great. But they must only work great by happenstance, so I agree, best to employ physics forces for this behavior. I was only even using this behavior as a learning tool to better understand how to work with blueprints at the component level vs the object level, so this is just a weird edge case tangent I've let myself fixate on, haha.
Thanks very much for your time and input on it!
You should also try to use Sweep movement on this test.
It should at least eliminate the explosive part when leaving the area. Because they shouldn't be able to enter themselves.
That'd sorta fix it but it's still bad form, physics is doing the sweeping for you already. Just interact with physics objects with physics.
Yeah, I had tried them with Sweep on to keep them from intersecting, but it definitely has some unique results in my particular case, haha
Try Set Physics Velocity instead. Force is good but it'll be hard to enforce a speed limit if that's what you're after. You'd have to tune a drag mechanic into it
Depends on what you're trying to accomplish
Oh, good tip! I was indeed worried about how to control them more precisely with forces
You can either do drag yourself like
Force = SomeForceFunction - SomeFunctionOfVelocity(drag mechanic)
or just add a force, and use damping to do the drag. either way
I heard of that a while ago, what is that?
It's like hot potato but with your project corrupting
Oh wonderful, how do I disable it lmfao
I went from having some tick events working, to almost none of them working:,)
I'm off the clock for today, but I'll give 'er a shot tomorrow! Thanks very much again for the thoughtful insights āļø
Are you on UE4 or 5, and is it a C++ project?
Feels like someone changed a GameMode/GameState combo.
UE4, 2.24 it's not a C++ project, but I think I have 1 or 2 classes
Only other thing that usually causes ticks to stop are specifically stopping them, or not calling Super in a C++ class.
Have you confirmed that the classes you expect are even being spawned? You sure you're not just using some default gamemode and spawning default pawns etc?
I didn't touch anything to do with ticks. I opened up the project after a weekend, and it decided to stop
Yeah Im positive, I didn't change anything. They were working before the weekend, and yesterday night they broke
You're using source control, right?
Not with this project, I'm not far enough along to care
It's not super crazy, just more annoying that it's been happening for a while
So what fixed it last time?
Backup for what? The entire project?
Yessir
Something sounds fishy here. I'd clean out intermediate, saved, binaries, and build it clean
Do it on a copy of the project tho before you nuke yourself
Odd. I was
I was new when I was using 4.24 but can't remember that happening.
It's not super common, over the 3-4 years of using UE it's only happened a handful of times, and on different versions
Compiling your project with the editor open. Doing so can corrupt your blueprints, most times irreversibly
Wait fr? So when do I even compile it?
that's something important, why didn't anyone say anything haha
You close the editor then compile in your IDE.
I'm talking about C++ compilation by the way.
We have that issue practically every day in #cpp. Sometimes twice a day.
Geez that's awful tf
Lol. True. At least UE5 tries to mitigate the problem
It disables hot reload by default. But some poor souls manage to turn it back on
Does anyone know if there is a way to immediately snap the camera lag on a SpringArmComponet to its final position? I want to do this inside of a function that resets my player position so it needs to be an immediate snap.
How do I tell my AI to go to a random target point that's in the map?
Like if I have a set of target points in the map, I'm not sure how to tell it to get the location of a random one.
Random point in it's area, or a random point near an area you set?
Just a random target point that's in the map. :)
I think theres a node for that, "Get reachable point in area" or something like that
GetRandomPointInNavigatableRadius
or
GetRandomReachablePointInRadius
Oh nice, ye it's that
Ah thank you!
Okay so I am aware this is a little complicated however I would like some help if anyone can assist. I've started a new game on the premise of fighting with music. The game mechanics aren't the bit I am struggling with but instead how I am trying to implement the music. So there will be a background song playing in the level and when you attack you will play a harmony to the main melody with whatever instrument you're holding. You can choose from many instruments and there are 4 players so I want to essentially make a virtual instrument for each instrument in the game and have either pre-written harmonies in midi or a melody generator in metasounds. My issue here is that there are no plugins I can find to play a midi instrument and making one from samples has proven extremely difficult/sounds awful.
can i somehow rotate the overlapping box before it detects any overlaps?
anyone got any ideas why my mesh is not facing forward?
most likely not
it probably just compares x/y/z bounds of all the actor bounds around it
ty i see... its axis aligned
@last ice use a box trace?
big thanks.. thats what i searched for š
maybe it does not face forward because of the program from what the fbx was exported has a different axis for "front"
if its about that you can force unreal to correct this on import (check boxes) or change the meshes orientation after import
Any ideas on how to get this drone to have a slow but noticeable wobble to it? I can only seem to get it to shake really fast.
decrease the interp speed
if i do that it's not noticeable
most likely because you pick a random float all the time
store them as a rotator, and once you reached the rotation you can generate a new random value
and maybe use RinterpTo
instead of the floats
ok cool i'll give that a shot. thanks!
You should be able to use the BoxExtent for this. Extent is the box halfsize from the center to the forward upper right corner.
ty for your answer but sadly you cannot set rotation in any way for the axis bound overlap boxes. box extent also just defines the height and with of the box for the different axis.
i use the "Box Trace" nodes now... thats exactly what i wanted. š
how do I get everything under "shared root" as an array? (not sure what to call these, child components?)
Ah. Yeah, my bad. I was remembering the vector functions that take the same parameters. A little odd that the box trace doesn't function that way, as technically that means it's broken. Actually just tested it with negative values and it still draws the box the same, but detects nothing. :/ What terrible coding.
Search Children from the Root Component pointer. You should find Get Children Components
ty
Does anybody know how I can kind of calculate a value that can represent on which side is the actor hit?
I am trying to see if I can do some kind of death system with directional death but im having some problems calculating the direction the pawn was hit at
Depends on the data you have and what kind of data you need. Are you looking for a basic left, right, front, or back?
Yeah, Im using the default UE damage system so it returns basically all that we may need
Hmm. hit normal might work. You could use that to determine direction I think.
@fading oyster dot
If that doesn't work in most cases, using the instigator's location would work.
Dot Product!!
Dot only works for determining one of two directions.
DOT PRODUCT@maiden wadi
You can use acos to get the angle
About as useful as four branches running off of each other's false statements.
Tried to, but I think I wasn't able to š
What do you mean?
Yeah, but how can I determine the direction from the instagtor to the actor
I tried to do some find look at stuff, but it doesn't seem to be giving me anything that I can work with
What are you exactly trying to achieve
When the player kills another pawn I would like to play a directional death montage, so I need a way to select that montage
Either being shot from behind, the left right and forwards but i am not sure how I can determine that
Well, are you interested about up and down too or not?
Nah, just forwards backawrds right and left
Try something like this for starts.
This will give you a basic integer for your choice. 0=forward, 1=right, 2=back, 3=left
Not 100% about the hit normal, that may need inversed. I don't remember if that faces away or towards the damaged point.
If it points away from it like I'd expect for normal traces, this should work.
Got it, do you mind trying to kind of explain how it works?
You get a direction. Rotators are easier to use in this sense so you convert the vector to a rotator. We ignore roll and pitch as they're pointless here. You use the Yaw from that as a flat direction. This is -180 to 180 by default. So you convert that to 0-360. Before the +45 this is 0 at directly ahead. 90 at right, 180 at back, 270 at left and 360 completes the loop and is the same as 0. So you offset this by 45 degrees, divide it into 4 parts with the divide by 90 and truncate. This gets you a stable integer for your directions.
If you needed it even more fractional, like say adding back left, back right, forward left, forward right. You could get the same thing by halving the 45 to 22.5. Then dividing by 45 instead. That would make the following.
Forward=0
Forwardright=1
Right=2
Backright=3
Back=4
Backleft=5
Left=6
Forwardleft=7
hello, I'm new to vehicle actors. What settings should I adjust to make the Vehicle Pawn less likely to flip over?
Wheeled Vehicle Pawn with VehicleMOvementComp
It's used for auto drive simulation, so constant X rotational behavior is not desired.
Thanks man, I'll try to set this up now I really appreciate the help and explanation šÆ
@maiden wadi you could also get the angle between the forward vector and the normal vector - location and do Pythagoras
So many ways
Some stuff with Right Vector too
so, if I want to implement all players sharing a camera would that be in gamemode or gamestate?
State. GameMode shouldn't usually hold many properties, as it has no way to replicate. GameState on the other hand can hold a replicated actor pointer. OnRep can set the view target. May also need a view set from Controller or HUD's beginplay.
GameMode is largely just for processing. If it's written in GameMode, you know it's server only and likely rather important. GameState is GameMode's networking actor. GameMode's processing can use GameState to multicast or replicate the game's "state" to clients.
Simple example would be game ending code. Function for checking exists in GameMode. The multicast or replicated values you need to show game ending UI and controls on clients would exist in GameState. As stuff happens on server, it might run that check. If it passes, it sets state in GameState and all clients are updated that the game is over.
that is the best explanation I have ever seen
I have been trying to search for a while but everyone always uses the same example that is kinda vague
thank you very much
what do you mean by "onRep"?
Oh, right, BP. When you mark a property as replicated, you can also have it as RepNotify. This creates a function that is called when the variable changes.
so this didn't change anything either. It's still just kinda sitting there. I even upped it up to 1mil to test it out on an extreme value
oh
thank you
I learned about that in a video
I just don't get too much of the lingo lol
isn't there some way to send events to BPs from the sequence?
oh how is that done?
well so cinematics cuts off the camera at the end of the sequence, how do I make it just stay there?
I have created some nice behaviors in the level blueprint which activate on a keyboard binding. I now am trying to create a sequence where I want the event to trigger when it is reached in the sequence. For this I generate blueprint interface functions, call the event from the level, and from the sequencer. I have read and tried some of the fol...
i figured out it is easy to make a rts like multiselect with the "draw react" node... but it seems its only available in hud blueprints... is it also possible to use them inside UMG Blueprints?
https://docs.unrealengine.com/5.0/en-US/BlueprintAPI/HUD/DrawRect/
is there a way to create a folder in the World Outliner and move some actors into that folder via BP ?
Hello guys I wanna ask a question again
I wanna take a snapshot using a function to execute. The function has been created. When I wanna take a snapshot, the rendering process is still running. Who knows how to check in blueprint if the rendering process is finished or not?
If the rendering is finished, I can take a snapshot then.
Has anybody gotten a 3rd person orbital camera working well? This is what I have currently, with the pawn ignoring control rotation, and the movement speed is completely dependent on the camera's pitch, making the character run in place when looking up or down
it's because you're calling the camera's forward vector. So if it's pointing up/down it's like you're pointing into the void or trying to run at the ground
I'm pretty sure anyways
I do understand the issue, ngl
on that note, I literally can't even get mine to run and I'm using basically the same code >:(
that came off rude, sorry, but I'm just not sure what to do to fix it
you're fine
I was trying to use the pawn's forward vector or the collision's forward vector
I would do that, but having the pawn be able to move in any direction without rotating the camera is better imo
if you still wanna use the camera's vector, you could try to only use one dimension of it
or 2, rather
I tried changing the Z to be zero and that didn't work
when I set it up to print and then PIE it comes across like this
I mean I'm also bad at coding I guess. So Idk how much input I can actually give you lmao
actually what the problem is is that X and Y are both zero, meaning you're not getting any direction from those
what is way to stop camera on jump in sidescroller game and move horizontal with camera lag
if it helps, I can't even move my camera up and down
add a variable like "AllowCameraMovement"
and turn it on/off when you jump
First one's the character, second one is the spring arm or camera
and maybe mess with the camera's lag when it comes back on
Ok
meaning you don't want the camera to jump up, right?
You want the character to move and then the camera will catch up, probably. Less jarring that way
yep
You'd probably have to do something like add a plane constraint to the camera component, assuming you can do that
nvm, that's a character movement thing
and also how can logic to modular like plugin or actor component how can get reference without crashing Editor
I don't know what you're asking here
how can logic to modular example logic is actor comp. bp and can migrate othe project to function properly without crashing example hard coding character blueprint reference.
Are you asking how to move something from one project to another?
the more complex you make a BP, the more often it will be referencing other Blueprints, generally. There will usually be some work needed to make an imported BP function, unless literally everything is the same in the destination project
Syntax error
if you just copy-paste something, it's probably referencing things that don't exist in your new project. Sounds like you just need to clean up those invalid references
if you can give me an example, I could help you, but I've got a good idea what the problem is
character with camera comp BP where camera logic(movement, fade , etc ) is controled in separate BP (Actor component bp).
It's really what it sounds like: you're referencing things that don't exist in the new project. Port them over or remove the references
Ok
does this node not recognize if an actor with an actor component implements an interface?
if you just feed it the actor?
hello, is there an alternative for this c++ function in blueprints?
GetWorld()->GetPhysicsScene()->GetPxScene()->lockRead();
I doubt it. As far as I know you can't run regular blueprints on anything other than the game thread, for one thing
ok thanks
im not sure you would need it-- im not familiar with this part of the system but blueprint ('s ticks) can be run prephysics, during physics or postphysics, and if you choose prephysics or postphysics, there should be no contention there no?
I'm looking into vehicle radar sensor simulation, with Carla as a reference. They did ray tracing radar implementation with c++.
before the start of multiple traces they use this function to lock the reading
assuming that was in the tick of a c++ actor, check what TickGroup they were using
yes
i bet they were using TG_DuringPhysics
well it might be important depending on what parts of the physics engine they are touching during that lock
i dont know what portion (if any) of chaos / physx is multithreaded
looks like it's just regular linetrace
const bool Hitted = GetWorld()->ParallelLineTraceSingleByChannel
and I don't see this ParallelLineTraceSingleByChannel they use in GetWorld()
perhaps because they used a modified engine version
ok yeah i thought PostPhysTick wasnt a thing (in engine)
so thats happening using OnWorldPostActorTick
ah ok
recommend either #legacy-physics (for PhysX) or #chaos-physics (for the new Chaos physics engine) for more expert opinion on whether locking the physics scene is needed in that stage
you can see where .Broadcast() fires for that event though, in LevelTick.cpp, where UWorld::Tick is implemented
thank you
Guys u know how u get 2 points when placing nav link proxy?
i can't see them anymore, did I press a button?
Hi all!
I have a question, it is both easy and difficult at the same time)
I need to make an invisible wall that would allow NPCs to pass through, but not the player.
Example: there is a cave in which monsters spawn and they must exit it, but the player cannot enter this cave because of that an invisible wall
howdy all. is there a way to lerp between two floats on a select node? Basically, I've got a select node that's controlling an alpha based on a character's stance. When they switch stance, the alpha changes. I'd like to smooth out the transition, but I don't know how to do it on a select
The option in the form of "trigger in a trigger" will not work, I need permanent access to the passage for the NPC
how to check a blueprint diff
to make it invisible use blocking volumes (invisible walls)
Is it possible to change blendspace variable directly from an actors blueprint (without using an aimationBP). Basically I have an actor that only has 1 blend space animation. I don't really want to make a whole animationBP. Can I just set the Blendspace in the Animation Mode and then change the variable manually?
I am making a endless runner game and i am worried that the player will be so far from the origin at some point that things will start glitching out , any suggestion how I can fix it like maybe teleport player back to origin in a way that the player doesn't feel it happened
The way I'd do it is make the player run in-place and move the world around them.
By "world" I mean the props and environment structure.
When the props are a certain distance behind the player, I then simply despawn them
The only movement the player would make is left-right and up-down
This is one method though, I'm sure others have alternative ideas
There's this YouTuber FatDino that made an endless runner. It's not a tutorial but you can check out his implementation
yeah i know i have seen him but he makes like a general concept and i haven't seen him talk about world origin even once
Yeah because his method doesn't need to mess with world origin or anything like that.
You can just use the run in-place method
it's good but it messes up the whole physics system if i have something on the platform let's say like a zombie, it's a good idea but i have to redo most of my codes then
I guess you could teleport the player back. But I can forsee a bunch of problems with it. Particularly the random obstacle generation. And the teleport destination has to be precisely set so that you spawn appropriately.
It's definitely doable though. Whichever one works for you
Teleporting the player is kind of hard cuz you have to teleport everything else in the environment too, but if you're thorough it is doable
Probably not more complicated in practice than the world-moves-around-a-static-player approach
i ended up figuring this out. i was not inheriting rotation from parent component
Is there a way to play a sound and wait for it to finish before continuing in a function?
guys which animation blueprint setup is better ? UE4 or UE5
no real easy way but this will do it
functions have to be instant, you cant wait for something to finish inside of them
no
Uh, so I have to split my code up?
If you want it reusable you could put it into an actor component
Prob a bit overkill though
hello folks! someone have some sort of experience with "geometry Scripts" and automation via blueprint?
My story logic is in one function so actively splitting it in half would be very difficult
I just want to open the UI in one case after the sound has played
As the UI opening pauses the world, which pauses sound playing
i Think that "Event on Rebuild Mesh Generated" does not fire, if the modifications are made via blueprint, but only occurs on item refreshing via editor
How short is your story?
Generally you only want a function to handle one specific task
what am i suppose to attach in "object"
are you talking to me ??
youll have to get a reference to an object with the same class as your BP_SaveGame
I am decomposing BP actor into standalone static mesh actor and I kinda got it working: https://www.youtube.com/watch?v=pKFtWMUC1EM
The problem is that static mesh components in those standalone static mesh actors have no meshes assigned, even though visually they are there.
So after saving level and reloading it, I get empty actors (they are on the level, but without meshes)
This is the function I call in Editor
How can I make meshes get assigned to static mesh components and get saved, so after reloading level - I have that house made of standalone static mesh actors present on the level just as seen in the video?
idk how to do it im a little new to blueprint
I wanna cast my savegame blueprint
should i make a variable?
Casting is just changing the type of reference.
You need to have a reference to something before you can try to cast it to a higher class in it's hierarchy.
Making a variable only works if you set it to reference a specific object. Otherwise it's empty
Aah i still don't get it :/
Simple question: I'm setting up some blueprints for modular level assets, where I can toggle certain meshes on and off (for example, molding types on a wall). It's all in the construction script, as it is just for level design functionality. What's the best way to "turn off" a mesh in the construction script? As it stands, I'm just toggling the visibility and collision. Seems a little cumbersome, and not sure if there is a better way memory-wise.
https://www.youtube.com/watch?v=HJxYPJF6wzk this will solve all your problems
@wraith cave every BP class that you can place in the world is or inherits from an actor. So I can have an actor type reference for a character.
If you need access to character data then you need to change the reference type (cast it) to a character type reference
if possible you want to use "set static mesh" and use a variable with instance editable turned on, so you can choose what mesh you want to use in a specific component
this tutorial kinda goes into that https://www.youtube.com/watch?v=nFeaBJ3P5kg
idk if that helps with memory problems at all though, i think it would still just load everything in
This was helpful!
Hi, I'm struggling to compare a Rotator value with a conditional (Equal), basically I want to make something happened when the actor hit a certain degree (for example: when the actor is at 90 degrees do this)
You will need to break the rotator and choose which axes to use as the condition.
well, i think that other way should work too, but the method mentioned is my go to.
Break into vectors ? When I do that the values changes from degrees to float that range between 0 to 1
Something likes this ?
Thanks! That's exactly what I was looking for!
There's also the option to break the rotator rather than into axes.
I didn't know you can split a rotator at the pin level, I'm new to blueprint growing pains haha. Thanks again!
pretty much any struct can be broken, transforms, vectors, etc.
Hi!
I'm using the following blueprint to cycle between colors from an array. It's working okaysih but it has some weird behaviour.
When cycling continuously down its ok, when cycling continuously up its also ok, HOWEVER if i press down down down UP the up will also go down the list and then, if i press it again it will go up.. same if i press up up down, the down will first go up and then go back to its normal behavior..
The array has 4 items in it..
Change index, then set color based on index
Not the other way around
Is there a way to change Acceleration Rate? What I mean by that - the amount that will speed up getting to MaxAcceleration I want to avoid as much acceleration as possible, but I'm not sure which parameters in the MovementComponent can help me solve that. Thanks in advance.
Is this not what you're looking for?
Don't have these kind of options "Floating Pawn Movement". I will try out, thanks!
What movement component are you using?
I'm trying to comprehend but sadly I cant : ( Can you please elaborate more? š
I'm using Character Movement (CharMoveComp). It was a default when building a TopDown template.
If you have the default character, you should have the floating pawn movement component in the character bp.
But these are the other types of movement.
I recommend just flipping through the component, I'm unfamiliar with the topdown template.
Okay I will try out, thanks a lot
Change the index first, THEN update the color. You're doing it the other way around
Can someone please help https://forums.unrealengine.com/t/breaking-up-bp-actor-into-standalone-actors-components-almost-working-need-help/577027
I have a BP actor, a house, that is made up of static mesh components. I need to break it up into standalone static mesh actors, each with corresponding component from the BP actor I am breaking up. Basically I need to end up with the same house standing on the level, but instead of being one BP actor, it needs to be made of many static meshes (...
Wow, thank you! It works just fine now ^ _ ^
I feel like you misunderstand how static meshes work.
If you make a BP actor class and add a static mesh component you can assign any mesh asset you have to it
If you place that actor in the world you can change on a per instance basis which static mesh it is using
@teal nexus
Or unless you have logic you need attached, I'd just skip all that and place the mesh assets directly
@tawdry surge yeah, but that's not what I am doing
I have a BP actor that is made it up of static mesh components
1 actor (with like, 100 components)
I need to break it apart
to have 100 actors on the level, instead of 1 BP actor
basically I need to extract all those static mesh components from that BP actor and have them on the level as individual static meshes
the video illustrates it pretty clearly
Hi there, an big actor can be split in actor components, how would you do that with the game instance ?
Can the game instance have components? I'm not sure if it can or not. What are you trying to do that requires components on your game instance?
GI can't have components, that's the problem. I would like to manage some network game code with the GI lifecycle, but I would like to not pollute GI, as it has a too general responsibility.
Hi everyone! I'm no t a programmer and i need an help with this blueprint: i want to replace the "Level Unload" variable with a variable that get automatically the name of the last level loaded. It is possible in someway? Thanks!
when does the array.get() actually run
currently I need to get something from an array after a for loop is done
and since there's no execution thing I cant tell when the get will be called
whenever I crouch with CMC my camera seems to not get down as much as the capsule, resulting in peeping through textures in narrow areas, anybody knows how to fix that?
I am trying to use dataassets from blueprints but I keep failing to find them in the Primary Assets registry
What am I doing wrong?
tried with and without _C in the GetAssetsByClass š¦
GameInstance Subsystem is what you want
Yes unfortunately it's C++, I would like it to be blueprint if possible
Them's the breaks. Subsystem or bigass GameInstance BP
@teal nexus I don't understand the point of this. If you want to mess with the individual peices you can play with each component already. What does this tenuous conversion to individual actors get you?
Unfortunately for a lot of things you cant escape c++
Since there are bunch of duplicate meshes, I need to "merge" them into ISMs. If I do it inside of BP Actor, I have to do it manually. It's a mess. However, if I break it up like I am doing it now, I can simply select all the actors and use plugin to "merge" them into ISMs in one click. Then I can put those few ISMs into single BP actor.
after some digging on the forums, it seems that creating static mesh actors (correctly) doesn't work in BP (would have to use Python for that). It was suggested to spawn actor so Actor class (not of Static Mesh Actor) and then my BP graph should work properly. I guess I'll find out after I get off work š
Hi everyone, How would I go about loading mp4/video files from a local disk at run time and playing them? I know how to do the whole media player setup but it's not the solution i'm looking for, the goal is to play any video from a packaged build.
@vale quarryAny particular reason it's on GameInstance? Does it need to survive level loads/unloads?
Hey! Does anyone know why this doesn't work on e.g. dropdown menus when trying to simulate mouse clicks with the controller? I know C++, so I could make a node if someone knows a C++ solution.
yes, to keep data like player id
Can't you just make the struct? I think it's default-filled.
Hmm, okay, so I wanna make a feature when the character can kind of mantle over something if it's just above his head, without having to climb up to it. Any ideas?
I got getters in there
Why are you going through the asset registry? Why not just use the data asset you have directly?
Initially I thought about a simple Object, but I want to use a third party game instance subsystem, which is not accessible through from an Object
If you're already in subsystem land just make another subsystem.
As in like, if something is at maybe waist high level to just above the players head, they can just press the jump button to hop up on top of it.
I'm using AddForce on Character Movement, but I would like this force to be constant no matter the actors mass, how can I achieve that? I checked Character Movement settings but after playing with the 2 options nothing seems to change and add force is still different based on actors mass.
No idea what DemoFunctionLibrary is. But I'd be under the impression that the mouse isn't in the right place for simulating the click. As that function has no inputs, I would assume it simulates the click where the mouse already is. You could try a SetCursorPosition or something. However I caution against this kind of development. It's worth just learning how the focus system works if you're trying to use controllers. Then your solution is directly portable to consoles and not just reliant on Windows.
Does anyone know how to make it when you click a button a widget event happens but only once and then every other time that button is clicked a different event happens and the first widget never appears again?
the whole idea is to not have to reference hundreds of files manually
just find all my data assets and iterate over them š¦
Have some variable representing the state of the thing and when you click it, do something based on the state, then modify the state
Hey ! it is possible to listen to any InputAction in Blueprint ? From the Enhanced input system please ?
Fair enough. Also I am not sure you have a data asset. Not as familiar with 5, but in 4 an actual data asset is magenta in the browser. Data asset classes are blue.
YOU ABSOLUTE LEGEND!
I didn't make a data asset, I extended my PDA š¤¦āāļø
thanks a lot ā¤ļø
Like these. The left is just a class. The right is an actual Data Asset
Took me a bit to get around that one too. š
Thanks for the answer, it works for pretty much everything, but not in drop downs for some reason. Are you saying I could do this by manipulating the focus? I haven't really looked into focus yet.
i'm looking into it, it indeed seems like focus is the thing i need to adjust
Basic ideology of focus is that non container widgets can support Focus. Containers are things like HorizontalBox, VerticalBox, Grids, etc. As an example here. A dropdown list might be a simple widget with an HBox and a bunch of buttons in it. You open the HBox, on it's construct, set focus to the first button. Now your controllers and keyboards can navigate in that menu and controller accept button and enter will "press" the buttons.
thank you for the information, this is really helpful š
If you're good with C++, I also recommend copying UButton and SButton and overriding it's display function to add focus to the same if line as Hovered. Makes it so the button's brush shows the same for hovered like a mouse and when focused.
aight, i'll look into that too if i am not satisfied with the result or get stuck
tnx
Can change highlighted line to else if (IsHovered() || HasAnyUserFocus())
aah nice
Ok so how do I set it up so my starting character is actually the blueprint of X character and not the Player Start blueprint?
Set Auto possess in the details panel of a character BP you placed in the level
Thanks. Forgot about that setting.
Or you can set a default pawn in the gamemode or set an override default pawn in world settings for a particular level
Does adding delta seconds to a float each tick make an accurate timer?
Should
Hi guys I have 2 widget inside of Choose card widget that i am creating in the picture. I am setting values on the next 2 steps and i checked they are working but the Choose Card widget doesnt show them setted on the viewport, it shows default values what am i doing wrong ?
Sure, disregarding rounding errors etc. But why not just store StartTime?
It's like adding up inches to measure something instead of just measuring the beginning and end points.
what do you mean by that?
ElapsedTime = CurrentTime - StartTime
instead of ElapsedTime = ElapsedTime + DeltaTime
Measureing the whole time instead of summing up a million little timechunks. Not saying they'll disagree, but over long enough timespans they might.
what if I wanna speed up or slow down the counting depending on different ingame factors?
Even over a single step they could disagree
Does anyone know if using a construction script instead of a material instance to set material parameters is more expensive ?
I was thinking of using that for cooldowns, like you can only kick 1 time per second tops
I'm assuming in the CS you're using a dynamic material instance?
There are several GameTimes which include/ignore Time Dilation and Pausing, that might be an avenue to look into
You'll want to just use the game time WITH time dilation (assuming you're going after the slowmo action mechanci like GOW)
makes sense, but what are the relevant functions for that?
Just right click and type "time" and dig around
Imagine you have a number of Blueprint Script Components in your project, but some of them are just files you're retaining to refer back to in the future. Is it possible to hide those irrelevant blueprints so they don't show up in the list of available custom components? Or would I need to migrate them to a fully separate project to accomplish that? My other thought is to give them some prefix designating them as 'not to be used', but that still keeps them in the list, cluttering things up.
You could expand the sections to account for times going at a certain rate. E.g. For the first 30s, it's going at 1x, so youre elapsed time is literally current - start. If that then changes to 2x, you can "accumulate" that first 30s in a value and then set a new start time to compare against and you're new total time becomes accumulated time + (current time - block start time) * flow rate
It is a little bit more complicated than standard time checks, but will give you better results than += deltatime
(for the frist section, accumulated time is just zero)
You just start a new block every time flow rate changes.
so without messing with time dilation, it should look something like that?
(kick start time is the gametime when the last kick occured)
could it become a problem with really high game time (like 4 hours or so), or am I underestimating the computing power of PC again?
@white elbowwhy not use "delay"?
you can set the bool "can kick" to false when kicking, set up a delay and once the delay is done, set "can kick" back to true instead
I mean how badly do you need to know the timing?
I would make a new project and trim it down.
but it seems like it could cause annoying to track bugs
delays ignoring calls when they're already running or resetting.. bleh
I prefer timers
like real man
puffs chest
multithreading ftw
oh, that's a good point, timers are another way of doing it
and i do use timers way more than delay
mhm same
more versatile, and you don't get the weird potential code overlaps as much
7 delays and 47 timers, not bad ratio
it's a concrete value tho, for example what if I have to make the counting speed proportional to the character's current Z value? Although it seems like a nice and simple way for most things
lol
see, timers would let you deal with that
since timers have ticks
instead of waiting a flat X number of seconds, timers can interact with variables
like lets say
you start a timer
and you say "go until the delay_var is 0"
the timer each second can decrement delay by 1
but
you could also have something else also decrement the delay (maybe a game event)
which would cause the timer to finish and fire your event sooner
much more flexible
yeah, in his case, i mentioned delay since it didn't look that complex nor repeatable
could you explain what an event has to do with it? I don't quite understand working with timers yet
ah
so a timer "works with" either an event (red things in event graph) or a function
you point the timer at one and say "run this X timers per second" effectively
Are timers automatically multi threaded? I don't think so
lemme double check my understanding
you mean "run the connected event x times per second"?
Yes
https://docs.unrealengine.com/4.27/en-US/ProgrammingAndScripting/ProgrammingWithCPP/UnrealArchitecture/Timers/
They seem to be threaded away from BP to Game instance and world?
I think I can figure out the rest on my own, thanks so much guys
I'll take a look! I always though it was running on the game thread!
mostly because I was looking into them for handling actor spawning
and even if you timer it out
actor spawning is always on the game thread
lol so it didn't help
what do "clear" and "invalidate timer" mean?
clear resets it to 0, invalidate means the timer var container is nulled (did i get it right @rich jungle ?)
honestly the more I look into it the less I understand it
seems like clear does everything you'd expect, stops the timer entirely
hahaha typical dev moment
but invalidate prevents referencing "isValid by handle" showing true
compared to "is timer active by handle"
so
I'm not entirely sure what all that means :D
ok, so i think it does what i mentioned. Invalidate clears the address, making it a nullptr
Hi! I'm trying to change values from array for Set Scalar Parameter on Materials the same way I'm able to change colors but it doesn't seem to work š¦ any ideas?
does delay work with real time or game time?
delay is frame rate dependent
Is this how to use timers? It seems to work as intended
Hi there, Looking for a way to add a flipbook animation over a character in 2d. Basically so the character can wield a weapon
Basically, i have character animations, Idle, Jump, Walk, where its the base character with no arm
I want to add an arm overlay with a plain arm, and another one that switches to an arm with a weapon.
Is this the correct way of doing it? Any suggestions on how to overlay a flipbook ontop of a character?
You can add a socket to your sprites and then attach another flipbook component on the socket
That's one way to do it at least
Thank you! I will look into that
You know those questions people ask and you're like "dear god, what the hell is this person even doing?"
....Is there a way to get the preview image of a static mesh in a blueprint as a texture?
How can I set properties of my directional light? a bunch of things are hidden and apparently are blueprint read-only https://forums.unrealengine.com/t/set-sun-source-angle-from-widget-bp/125988. Does that mean I need to use CPP?
It would be great if there was a feature to take a variable in blueprints, and in one command, replace every node of that variable with another variable of the same class/struct. Whenever I take a BP template where all the variables were defined in BP, and replace them with a c++ version of that variable, going manually through all 200 of that v...
hey
when you transfer assets from one project to another
how do you import the custom inputs as well
right click on the asset -> migrate
oh im dumb
didnt read
how do I take THIS from it's original project and put it into the new one?
you have to get the inputs from the first project, go to the Project u want to export your inputs from, in Project Settings / Input, export, open the new project u want to import the input in project Settings / Input
then that walk event wont have an error
Clear stops the clock. Invalidate throws the clock into the trash.
which file do i import them into?
thanks!
anyone know what this node is called?
RelativeRotation. It's a variable that returns a rotator. Right click the purple rotator pin and split it.
what is the command to empty an array compeletely
that worked perfectly thanks! only problem is my animation to wield the sword from the back to the hand keeps looping i cant seem to stop it, but after playing it once it adds the sword to the hand
Clear
Does anyone know if theres away to get Editor Utility widgets to work outside of the main world window so they stay?
is that a particle system?
yeah
and nothing happens when you press it
it's set to not visible
so idk why it isnt working
Is that in an actor BP?
Hmm.. do you have another LMB event in the controller?
yeah
Thats consuming the input first
is there a way to prevent components changing their location when the player crouches?
Then idk. Should work but default
You're not disabling input to the character anywhere?
I'm doing a lil something with multiplayer, running 2 instances on the same pc rn
If the host switches levels, then the client joins they can't posses the pawn
But if the client connects BEFORE the host switches, then the pawn can
why is that
how do i get a particle to reset?
Call Activate on it again with reset being true
thank you! and how do i set a cooldown?
How do I do a collision between two components of different actors?
I can do component and actor collision but not component and component.
@mental trellis Well, there's an actor that moves into the other actor, but I specifically need a component from each ones to collide (because I have bigger collision boxes around the actors that are what collides if i do actor.)
That doesn't really wok. Only the root component is checked when you move stuff around afaik.
hmmm, so I can't do collision between components?
I might be wrong, of course, but I don't think so.
Ahh, I'll see if I can find a solution. :)
The solution is to use root components as collision components!
I'm not even sure what a root component is, I assumed it was just the first component. XD
I'll look into this then! :O
The root component is the highest component in the component tree.
Oooh, yeah that's what I thought, but is there a way to code collisions between them?
In the ComponentBeginOverlap event it won't seem to let me use collisions from the actor I'm casting to.
Maybe it'd work if I created a reference instead?
You're setting visibility to be false, is that what you're trying to do?
yea, but i fixed the problem. my other problem is being able to set the visibility to false again after a certain period of time (2 seconds)
Hello my blueprint variable that is an instance of an object, when get sent to server from client, becomes null. How do I solve it?
is the object replicated?
Can someone tell me why can't i save/load my data ? i think the code is correct
I want to save the money spend in my game on like a bike in market but it doesn't save
I've messed with saves a little bit and I've run into an issue where I just have to delete the save game sometimes and it regenerates and fixes itself. Not totally sure why
I can only assume it happens when making changes to the BP
any tips for getting a direction based off of the wasd keys then turning that into a 300 force launch?
Hello! I'm trying to make some kind of snake game in unreal. I'm using coordinates to check where to do direction changes, but from where it reads to where it changes, there is a delay that affects the movement. For example, if it detects X=100 (a valid change coordinate) and moves, it does at X =114 or 107, for example. I could use a range to avoid minor errors, but i think it would look nice if some changes are not aligned with floor squares. I'm using tick event for movement input while it is in running state
You mean that you want to get the world direction from a pressed key, right? It's a lot easier to make it based off of the pawn's rotation, but if you want to do it your way I think you might just have to iterate through a bunch of "Is Input Held" checks to figure out what's being pressed before calculating the transform
I'm trying to add a double jump that sends you in a new direction based off of the button you're pressing
Have you messed with the jump settings in the CMC? Sounds like you might want to start there
I didn't see an option for that. The first jump goes through that, but for the second jump, I'm using Launch Character
which is working, but it just stops them mid air and they go hella slow
Another easier way is to use the character's current velocity, but again, that may not be the way you want to do it in your case
send a screenshot
pretty sure overriding those directions will reset your momentum. See what the hover text says for the bools
but doing it based off of the direction they're trying to go
yeah it does, and I want it to do that
I want to relaunch in the direction they want to launch in
this is the product of the way you have the node set up
It sounds like you want to do this through a different method
it's working for the z axis lol. Is there no way to do it for the other axis the way I'm going about it now
It's working the way it's supposed to. You're resetting the character's momentum through "XYOverride" and then inputting (0,0) for those values. The character does not move those directions because you aren't telling it to
So, I just began to work on my first actual game, Im still a newbie tho and I get confused easily lol. Im trying to make a 2.5d kind of game and I implemented movement, added a hitbox for the attack but don't know how to actually trigger it (the attack itself not the hitbox damage), can somebody help me?
what do you have currently?
I understand that T_T
I want to change those zeros depending on the buttons being pressed
If you want it to be totally dependent on the key being pressed, there's no better way I've found other than just checking through each WASD key in order
that's fine, but HOW. Like is there a condition node for certain keys being pressed?
I don't mind doing branches, but I'd rather not deal with a bunch of variables
yes. It's called "is input key held" or something similar
thank you
np
I can't replicate an object class and the variable, yes I tried all replicate conditions and anyone works
basic movement and an hitbox attached to the sprite along with the inputs
Sprite or mesh?
sprite
where does the actor get spawned?
I don't know sprites tbh
The actor is the player character that is owned by the client and sent to the server, to do some logic checks and then execute an action that only the server can do.
As in, you're sure you're spawning the actor through a server RPC?
Okay np, thanks for wanting to help me (sounds ironic but it's not sorry T-T)
You cannot replicate Objects from blueprint. That requires C++, as well as an owning replicated actor to use it's channel.
if it were a mesh I'd say to attach a collision component to a bone on the skeleton, but I don't know if sprites actually have animations, meaning the component/bone might just not move
here's what I'd do, and then each branch can run into its own Forward/Right vector check based on which way it's supposed to be relative to the character
it's attached to the sprite, and you can set the animations based on what you need, even tho Unreal doesn't seem to be the best at making 2d games
The actor that holds the object instance variable is the character. They are spawned at the start of the game.
Thing is about thing is about inventory, the client has an inventory that is on his player controller. Then I send that character to the server, I get the controller and then the inventory. And the inventory items are settled on default value and I had the same issues with object instances that are null.
I think that this is related to replicationTransient.
For example I send from client to server an instance of my own just created object instance and I get null value on server.
The other guy said that BP doesn't replicate objects, only actors
Yes, that is what I am discovering right now. With such issues. So with that, how I am suppose to achieve this goal?
I come from other programming languages and having actors that hold instances of logic with specific logic and variables, and not being able to access them on the server, is being a limit on my development
What would you recommend me for this?
I believe that the only 2 options are to either make them actors instead (if that works for you), or work to develop them in C++
Honestly. If you have any interest in networking, you need to use C++ with Unreal. You can sort of hack your way around a lot of things, but BP only development doesn't work for any honest game.
depends on scale, tbh
learning project / something for fun is totally doable in BP, but C++ multiplayer is pretty vital beyond that
No problem. It's one of those things that's like "there has to be a better way to do this", but then you realize that most game logic is just iterating through a bunch of layered condition checks anyway
Possibly. But really you can't do a lot in BP. You have no FastArrays, no UObject Replication. No OnRep OldValue passthrrough, no ability to do conditional replication blocking, lack of access to pushmodel. And you're forced to have OnReps run on server as well. It's just terrible and messy.
It's really no different with UI. UMG is okay for surface level stuff. But any serious UI just can't really be done well in BP alone.
I don't disagree, but you have to start somewhere with it, anyway. Not everyone knows CPP, and learning that plus MP would be a complete slog
I see, thanks for the advice.
Thank you
Just out of curiosity, how are you supposed to do it, if not with UMG? As far as I've heard, the only bad thing that should be avoided about UMG is binding to variables
It's mostly the same as normal BP. There's just a lot of stuff that isn't exposed in BP. Also UMG really isn't that well fleshed out as a whole. It exposes a bunch of basic widget, but the key word on that is basic. They work, but they're limiting. Case, you can't style a button in UMG for having focus without putting a UButton in it's own Userwidget and overriding OnFocusReceived, and changing an entire brush to another one. Most times you want the focused look to be similar to hover. You can do that by literally adding "|| HasAnyUserFocus()" in C++. You also get access to slate, so you can create your own widgets from the ground up. Like a Grid that actually has the ability to pad between it's children with a single variable change instead of adding a bunch of spacers every other line. You can add OnRightClick bindings to buttons that set the visual to clicked same as a left click by nothing but adding a delegate and changing some basic if statements. Faster for loops for searching through data. An easier sorting function to rearrange UI in sorted manners with predicate functions. Access to FSlateApplication for better control handling.
It's just a huge list of drawbacks to stay BP only in UI. Doable, but it'll make you insane.
That makes sense. I'm really not much of a UI/design guy, so I haven't really used it for a lot other than just conveying basic information
does anyone know if i can use a bone name instead of a socket name in this node?
Yes.
pretty sure possession is singular. In theory you could store references to other actors in the player controller and use some events to control them. If this is for an RTS-type application, pretty sure it's best to instead use events to instruct the pawns' AI
ah
Im trying to control two characters with one controller, like one per analogue stick
You don't. You possess some pawn (camera carrier maybe) and have 2 others that you pass inputs to
Possession is specifically 1:1. You probably just want to create events for the individual sticks or something
Prolly will be doing that then
plz don't crosspost kthxbye
im also wanting to allow for other players to connect mid match and possess the pawns for multiplayer
im guessing i can leave in the the inputs in the pawns and just possess them like normal and stop passing inputs once the new player connects
can't get this node to work for the life of me, anyone see anything I could be doing wrong?
with or without specifying mime I get the same results
course after I ask I get it working, was the parenthesis 
in BPs, how can I check if an enum is equal to another? The math equal node doesn't accept enums
it doesn't come up
oh I missed it, it does come up
thanks
This is kind of a broad question, but how do you guys usually categorize maps in your game? do you usually end up with as many maps as you do screen transitions? or are there usually multiple screens per map somehow? I 've become a bit confused from seeing so many tutorials that call the map "Main" as opposed to something like "level 1"
tutorials arent designed with making a game in mind
No matter what I do, I cannot get a valid pointer to the Movement Component of my Character. This is the animation blueprint from the third person blueprint template (with minimal changes).
The Character reference is always valid, but no matter how I reference the Movement Component, it's never valid.
Hello. i have a beginner issue here :
I have this very simple code on 2 characters. when i press the key, oen character is being bump nicecely, but for the other, he only bumb latteraly (so, going up, but not moving horizontaly) why ? how can i fix that ? (why is the X-Y movement not working?)
try setting your launch velocity on that character to X:1000, Y:1000, Z:0
if i'm reading your blueprint right that should work
nope. not working. is there a physics parameters i could have, stoping the horisontal effects ? i dont know too much physicals components
i'm not sure, i'm new to unreal engine myself
thx
I think in most cases it just depends on what you need. If you can reuse the same map for different things easier than having ten different maps and having to change similar states in ten maps, use one. If you require multiple for some reason, then it's necessary. Maps can be surprisingly reusable in some game types, where in others maps are very hand crafted. Some utility maps simply make it easier to avoid muddling other classes like having a main menu map with it's own gamemode/hud/controller etc. Then you don't need "IsInMainMenu" states for random things.
Out of curiosity, why are you not getting the component from the character reference? You're using two separate paths here and the one you've gotten the component from isn't checked. If Character is an ACharacter reference, then it should have access to the movement component you're after. Even if it's a Pawn it should be able to call something similar to GetMovementComponent, which you should be able to cast to the CharacterMovement.
one map per screen sounds like an unnecessary mess
that's like writing a novel and getting out a new peice of paper every time you want to write a sentence
ahh, ok. gotcha! thank you, guys this is very helpful. I'm making a 2D side scroller and I know I can put multiple environments in the same world if I want to space them out from each other, but eventually I feel like my worldspace values are gonna get insane and my outliner is going to be a mess. I trust anyone's experience over mine at this point with very little game design background, I'd just like to get a better understanding of why this seems to not be standard practice
Just a bunch of changing random things to see if something would change. I fixed the problem, and changed the animation blueprint to what it was before.
the range of movement is pretty massive by default, but if you really need you should find some design technique to rezero everything, or look into techniques for allowing movement outside the default range, I know that's also possible but I wouldn't bother with it
And worrying about your outliner filling up doesn't sound right - if you're making a side scroller, things way behind you shouldn't still be loaded at all
Except maybe as small bits of information related to what state is there, such as a some bools about which doors have been opened or enemies have been killed
yeah this makes sense. super super helpful, thank you!!
I still think this comes back to organization. It really depends on what you need for levels and what kind of game it is. Side scrolls doesn't say if it's an arcade run through like Sonic or Metal Slug, or a more story oriented back and forth in and out of buildings style. In the end though, it doesn't matter so much as long as your scale doesn't get out of control. If you're not repeating yourself in each map, then feel free to make many maps just to keep the level blueprints and level simplicity there. There is no perfect way to handle it except the one that works for you, that gets your project done, but like anything in development, just avoid having to redo the work.
I mean. Take into consideration old Sonics. If I was remaking it today. I'd probably have a main level for each area type. Three "levels" per area type. So you make one major map per area type. This has your backdrops, general stuff that would get copied. Then you load in the actual level as sublevels which has the terrain and enemies, ring locations etc.
This really depends on the project.
you can still split if you hit the limit
wouldn't create more work than necessary yet
fun fact, sublevels can be loaded entirely independently from the main map
gets too big? you can actually just move all the actors into 2 sublevels and start using those instead
also possible in worldpartition land (where sublevels are banished), just make [packed/unpacked] level instances
Hello, is it okay to post a link from the Ue forums to a post i posted and still didnt get help from there !
Hello everyone this is my first time posting a question but i reached a point where i am stuck so hopefully someone got an answer to what i need. First of all ill explain what i have and what i am trying to do I am currently working on a Multiplayer RPG Game and its almost at its alpha stage but i am still stuck on this If any of you played a...
I need to make different types of terrain for my game. The game wont have mountains or 3d hills.
Is just a floor. But this floor should have different types of surfaces, sometimes, grass, sometimes dirt, sometimes desert or ice.
Should i create a different floor for each different type?
There are a few ways you can tackle this.
one is a data driven approach, another might be inheritance
but you really need to break things up here
Inventory. This should likely just be a single component with lots of options that the certain roles can use, or not use, as well as limitations
If you go with inheritance for the actual charaters, just make a basecharacter that has everything that is common to all the roles, and then subclass it for each role, changing only the options that are specific to those
i know this is a complicated system and will require to restructure allot of things and its very time consuming but its the base of the game so i dont mind spending months on it
GAS would be EXTREMELY helpful here, as you can grant and remove abilities
GAS?
I'm not quite sure what your question is though. if you're asking for validation, yes it can be done
thats how i was thinking too
i dont know how to start this though , like do i start by creating different roles then setup the abilities and inventory based on it
GAS would be an exelent use case here , but it does come with a big learning curve, and you have to set it up in C++. I recommend taking a day or two looking into it, and seeing it's pros and cons
there's a couple marketplace assets that would make this so you can touch c++ as little as possible, but you'll still need to learn some
i am good at doing basic C++ but i am mostly good at blueprints
GAS would allow you to assign abilities, effects, and take care of several replication & prediction issues.
The abilities would be super beneficial here, as you can make them, and grant each role an ability
See physical materials.
these can all be added/removed at runtime as well
for the inventory i was think of creating ClassTypes and assign them to the items and clothes, then in the inventory when selected a role it will display only that Class Type
is that a good approach
you can either set their types using enums, or gameplay tags
then check against that when allowing equipping
someone suggested to me the gameplay tags as i can you specify how things will show in inventory
thats the approach i am going for
here's one of my items for instance.
Notice how there's a an enum for which slot it may be equipped on (head, torso, legs, etc)
Inventory will display a selected Class and a Selected type of equipment
physical materials? I looked it up, maybe i got the wrong result but i came across physics materials? I'm looking for just a cheap aesthetic surface for a 2d terrain. All i come accross are super fancy 3d landscapes with hills.
this is using GameTags ?
I really mean Physical Materials.
sure you can do that. you can filter the data however you'd like
I don't yet use gameplay tags for items, but let me show you an example
is there any Documentation or Tutorial on filtering Game Tags that you recommend
I'm going to assume you already know the basics of materials, as physical materials are something you add on top to define behaviours with certain materials (e.g. footsteps)
it's a simple node. ContainsGameplayTag
And thats the cheapest way to make a surface material? Yeah i see. But those properties, like behavior and physics are not necessary. But im overthinking, if you say this is the way to go, then it must be it
You already know the basics of material, right?
i think so, im never sure if i know stuff well though
Here, I made a variable of type GameplayTagContainer
Here i set the tags Role.Assassin & Role.Ninja
in the inventory, equipment, or whatever class, I can just see if one of those, or any of those tags are available
inventory is base simple as Filtering and as you said i can use tags
thats solved
what about the character him self
i wanna add a button where they can switch between characters/roles
damm how didnt i think of this
GameplayTags come with GAS, so you may not have heard of them before looking into GAS
i can do all of this now, if you can only explain one thing for me and ill be good
that's all very doable. you just need to architect that yourself.
might be something simple like, having a list of available roles, and where the character BPs are
and it's fetched from game state or something similar
you could choose to go with any way of doing this btw. could be a string, text, an integer that represents a role, enums, an FStruct, an actual class, etc
This is just the way I'd personally attack it.
So we have the Player and the Player got Roles and each role has its own abilities, equipment, leveling, inventory, etc. The Roles itself what are they considered. i make a BP and create them as Variables then assign these to different functions and filter them ?
List of roles
thats what i meant
i create these maybe as a BP Table ?
A simple way to list the roles might be a table
yup
just have a role that has their name, and their BP
you know ill make a new project and experiment then ill implement it to my game
take a few days looking into GAS. it's a lot of work, but well worth it, as you can swap in/out abilities on your characters based on their blueprint, items, equipment, a data table, etc
each character can just have a list of abilities to grant
see in my equippable items how I handle this
so i can use GAS to make abilities depending on the Sword they have or Type of clothing or even role
yup
ill for sure try it out too
i have other questions if ur free to answer
Hi BootaMan, At the highest level, it sounds like youāll need to use OpenLevel Node for changing levels and the āGameInstanceā for storing data between levels. Diving into a asset pack systems could be like ājumping in at the deep endā But there is a free pack Easy Quests that will atleast serve as an example for how some of your ideas could b...
I see that from your questions you're kinda unsure how to tackle it, or ask the right question. don't worry about the UI, or how it's supposed to look in your head.
What you're actually asking about, and what you actually want to know, is the architecture.
i am more of a level design person but i got my self to learn BP and C++ to make my game work xD
quest systems are kinda tricky to get down
yea like i cant seem to find a way to teleport the player to the same position they were in the Open world
I've made on in unity that I can share. if you've worked with C++ I'm sure you'll be able to understand (it's written in C#)
yea sure
DM me, and I'll put together a few gists
i know i need to set a trigger and it will tackle the function to bring the UI for the ending then the button Done will teleport them back to the open world but when i tested around before it takes them back to the spawn point not the old position
yeah that's easy, don't worry about UI for now, but it's as simple as storing their world location, and later just setting their world location to that stored variable.
ohhhh
The base pawn class doesn't automatically apply add movement input. It says you need to apply on tick yourself. Doesn't seem to be an apply node tho.
Do they mean add movement input flat doesn't work and I need to make my own version of the function?
Is there a way to make a material that have a hole in it? or a widget with a hole in it?
My purpose is to make a UI tutorial, like "here you can see X" "here you can see Y"
which will be the best way to achieve this?
opacity mask
but how i move it in runtime, and focus to the widget i want to make the opacity mask. I want to create a "boolean material"
that question is quite open....
do you want to highlight different parts of the UI? objects in the world?
parts of the UI
i've made a simplier version
and i want to adjust the whole to the buttons and texts
well you need to know their location/dimensions and pass that to the material
or you hack your way around, by moving the desired widget in another container which is in front of everything else
also depends on the shape of your widget which approach would actually work, so it's not trivial
that only works reliable if they are all in a canvas or something, it's highly likely that it will break out of the layout easy
if everything is box shaped, i would figure out the position/dimensions, send it to a material which is on a border in front of everything and draw the opacity mask in the material from the parameters
ok and the last question, i have all this but the whole is drawn by "GeneratedRoundRect" or by a imageTexture and move it with textCoords
if i spawn an actor/object and then do an == to its blueprint class will it always give False ?
yea?!
you can't compare objects to classes
but you can get the class from the object, and use that to compare against classes
@spark steppe is there a function to check Is of class or smth
there's is child of or is A
not sure which was the BP function name
if you want to know if it extends something
e.g. if banana.class isA fruit.class
ok i will see this
thank you sm
@spark steppe i did it this way and it seems to work. is there anything wrong with this way
why do you cast the class to itself?
remove that cast and select the class in the dropdown which you get on the equal node?
Hey, it is possible to bind to an action from Enhanced input in BP ? By the InputAction Object Reference like so ? Thanks
Is there maybe another approach for my building issue? how can I avoid it to be floating? im using a collisions for snapping points. maybe to disable them if the next on is floating? (Z axis?) i cant seem to think fo better approach
Bool checks arent super expensive, are they?
Hi everyone! I'm no t a programmer and i need an help with this blueprint: i want to replace the "Level Unload" variable with a variable that get automatically the name of the last level loaded. It is possible in someway? Thanks!
Hey all, asked before so apologies but Iām still stumped by this - when adding a SceneCaptureComponentCube as a Component to my Blueprint, the āHidden Actorsā section usually found under Scene Capture in the Details is missing. Does anyone know why, and if I can hide particular actors from the SceneCaptureComponentCube within my Blueprint?
Hey guys! One question
Is it possible to create Data Assets that are not replicated through all instances? I mean, I'm rebuilding my inventory system using Data Assets, and whenever I modify the quantity of an object, it automatically changes for all of them. Any ideas on how to avoid it? Thanks in advance!
Hey guys.
I have a skeletal mesh. Iām getting the location of a bone on that mesh. How do I transform the location of the bone from local to world or vice versa?
how can i connect Event Tick to 2 functions at the same time
Use a "sequence" node
Thank you very much @trim matrix
No, they should be pretty cheap. But depends how you use it, are a lot of actors using a function with bool checks on event tick? That would be expensive.
Why not just create a custom function that does both Load Stream Level and updates Level Unload name?
You shouldn't be modifying the data on data assets. That's a poor use case for them.
Use them for ReadOnly data.
You'd be better off using a normal UObject or struct rather than a data asset
Yeah, I've read on that, I think I'll replace with UObject references
I disagree with that. For read only you have data tables.
Data assets are to be updated
If you update a DataAsset in one actor, it'll be updated on all
Yes, that is what they are for
To have shared data
The fact is that, for an inventory system, they are not suited
Not if you want to update all uses of that particular data asset.
If you modify a data assets the change propagates to all uses of that asset.
Not really a good idea tbh . I'd prefer them for ReadOnly stuff
For instance, I want to store that the crossbow has been reloaded
If I do with DataAssets, all crossbows will be reloaded
Not saying that Data Assets are for everything. I am disagreeing with them being read only
I understand what you mean. But that's something I'd rarely do. Have a global instance of readwrite data.
Sounds like a recipe for unexpected behaviour
I mostly use them for pre-sets
To give designers options to update a data asset with UI button and not have to update every value by hand
But I agree
With great power comes great responsibility
Very true
hmm, I use 2D capture components in my project and I don't see a "hide" or "hidden" actors section in the details rollout of the BP editor. You can use the nodes, Hide Actor Components, and Hide Component though. (I'm on UE4.26)
@zealous cedar though on a hunch... I tried dropping the actor with the components into the level, and in the level editor I can set the hidden actors. But when editing the BP itself, setting that list doesn't seem possible without nodes.
so the workflow for doing it programmatically or by hand is different
@tight schooner Yeah, when dropping a SceneCapture Actor into my scene from the Place Actors panel, the optionās there. When adding one as a Component to my BP, itās not. Odd. Thatās interesting though, I didnāt think to check the Level Editor. If I wanted to exclude Actors within the BP then, would you advise adding the node(s) you mentioned in the Construction Script? What Iām looking for is a way to use the captured scene in a Static Meshās Material within a BP, but without capturing the Static Mesh itself (the capture sits within - Iām just experimenting with fake Translucency/internal mapping)

Add the relative location of the component to the actors world location
Sorry Iām new to Bp. Could you show me how to do it? Also does the rotation becomes ws too?
In material I would use a transform node to transform from ws to local.
The actor's rotation will be in world space. You can get world or relative location/rotation for any component.
What are you trying to do?
Like I said I have a skeletal mesh. In BP, I call the mesh and get the location of the bone on that mesh, it returns the world space value of the bone. I want to transform that worldspace value to local value to my bp actor.
Since moving the bp actor around that value doesnt become relevant anymore and stay unchanged.
So get the transform of the bone and subtract the actor location. That will give you it's position relative to the character's root (aka the actors world position)
Ah yea thereās a way around that. But that doesnāt work for rotation. isnāt there something like transform matrix from ws to local and vice versa?
In material thereās a transform vector node, and in Niagaraās scratchpad thereās a transform node Systemlocaltoworld etc..
Why would that not work for rotation?
Subtracting rotation is smth fuzzy to me. Can you show me how you do it?
I'm not at my pc yet.
They have vector minus vector and rotator minus rotator functions tho
Just subtract them. The difference is the relative location/rotation
Got it. Iāll try. Thanks for your help.
Still. It seems like itās just a bandaid fix for this stuff. Im sure thereās a transform vector node in this. As it does in material and scratchpad.
You can definitely just get the relative transform of the bone once you have a reference to it.
Does anyone know where this painting game is in Lyra ?
if i use set game paused all the input gets disabled except for mouse clicking input. i want to use the escape button to do the same thing as the resume button in the pause menu widget blueprint. the screenshot is in the thirdperson blueprint