#blueprint
1 messages · Page 334 of 1
This happens because of undisciplined references in the code, we're not talking about references to objects we're talking about references to classes
while reading that it already felt wrong, "Main menu has the character in it", I totally get your point here. It feels a bit like Onion Skin Layers or something like that, by building the outer skin first before the inner if referenced wrong.
If a blueprint has a reference to a class anywhere in its code, that other class has to be loaded into memory with it. This creates an endless web if you're not careful. You need to have logical breaks, like fire breaks in a forest
20 gb, just to open the main menu
damn, thats like referencing a new Player Actor each tick, getting those 2-3gb nonstop
makes sense, like with models, materials and textures, load the model, every texture inside it ramps up v memory and every material adds a drawcall.
Do you suggest using some tools to concept the architecture of specific systems? Im using draw.io right now but Its nowhere easier to concept there so I dont lose overview
I want to add as the simulation starts an element to the deformable collision actor (the first photo) because the static mesh I want to add spawns as the simulations starts
Utilizing hierarchy and base classes. Base classes would have you're core functions in them but wouldn't normally directly reference assets such as materials, meshes and sounds.
This means they maintain a small foot print and would most likely be loaded anyway meaning it's pretty safe to reference.
You would then create children of these bases classes to finish implementing them.
Actor Components is another great option as you can use the 'GetComponentByClass' to get the specific component without having to cast to a specific actor type.
Adding to this, utilizing hierarchy can make it easier to utilize soft references.
You need to think of it in terms of memory. Ask yourself which object will always be loaded into memory. Imagine your game is just an office space, with only one level. The doors in that office space would always be there, cuz the player can never be anywhere else. Therefore you're always going to need those doors loaded into memory anyway. If the player character had a reference to the door class, it would be no problem. But what if you want the player to teleport into the desert in the next level? That new level loads up the character, which loads up the door, even though it's not in the level.
I see, so the least unnecessary information I reference somewhere else, the better
When a level boots up, or when a player walks around a level that's streaming things in and out, we want the RAM to not have anything unnecessary loaded in.
If you're not sure, use the 'Size Map' to see how much something is referencing.
You can see why referencing the player character is unlikely to ever cause a problem because the player character is almost always there anyway
But if the player character has a variable which is a door that isn't even in the level, then that door, and all of its materials and all of its related textures and all of its related noise files have to also be loaded into memory
Thats a good mindset, but Im always trying to find "justification" for this reference. For example when player knows about the door, it can use it because IRL we would also need to know which door we use before we use it. But in my head it should only happen when the player approaches one or has a task of switching rooms which has a door inbetween. But otherwise it doesnt feel right making the player have door references of the entire building (altough it does make sense if its his home). But what if its a bank heist and player isnt supposed to know any doors, but already have a reference to them?
Adding to this, this would be a great candidate for a base class. It would have the core logic and functions that you then implement in the child and setup all the meshes, sfx etc...
You're incorrectly thinking that the memory linking would happen when the player touches the door. The memory linking happens when you write the code.
Anyway eventually you'll figure it out. I was just trying to point out that whether or not to use inputs in a function would heavily depend on which object could most easily access the relevant information, particularly aiming to avoid a central class referencing a peripheral class
I am pulling my hair out with this friggin' thing. The heli is placed at 0.0.0 in the bp and the SKM is the scene root. I have made a convex hull for the physics body and in the blueprint enabled BlockAll on the SKM. And for some reason or another the heli cannot land on the ground because something invisible and unknown to me is in between IT and the frigging floor it would colide with. The forward and backward collisions of the hull seem accurate in x and y and on the top of the heli, but not below? There's a HUGE gap of air between it and the floor when I try to land. In the last pic (titled Air Gap) you can see that as far as my controls can tell - I can land no further because of physics.
All I am doing is setting relative locations and rotation for this pawn.
I am super confused as to what the heck is happening
UH the filenames
Yeah I get that 🙂 Im just not getting how to stop the "absolute real life way" mindset. As a person in a to me unknown building, I wont know any doors, so I cant have the variable, but in games it sounds like the variable have to be there already, and just filled with doors found. And Im trying to justify that with some explanation compared to RL 😅 I dont learn otherwise for some reason
yeah thanks a lot for the info man, appreciate it 🙂
I just don't get what in the world is creating this impassable "barrier" for me when blockall is set to my skm
Imagine you create a variable on your blueprint which could point to a door, but it is currently empty because you haven't seen one yet. In this case, you have already loaded the door into memory because you have referenced the class, even if there are no objects of that class in the level. Think of a class as memory in the real world.
It's a file on your computer even if the game isn't running
so like "I know this building WILL have doors, so I already reserve this memory location for any found doors"?
Show a pic of the set location code
It does make sense, just hard to think like this for some reason, it feels right but I feel like I need to know it beforehand. Thanks again!
No. The door class is a file on your computer. Does it need to be loaded into RAM or not?
Forward movement for instance
Up/Down
Show inside that function, relative pitch roll yaw
All it does is is rotate the heli into the direction we are pitching/rolling. Yaw isn't really used
And only does it for the direction where the input target value is not 0
You're using the set relative location node, that changes the position of one component of an actor relative to the rest of the actor. I don't think it can be used to move an actor
Its relative rotation
I do not use relative location to move
The rotation is relative because it needs to be relative to the scene root of the bp so the heli tilts appropriately along it's pivot.
But the movement itself is done via "AddMovementInput" node and I am using the floating pawn component
Did you try a different landing pad? Could be a problem in the level
I tried doing it on the open world map. Lemme try to check on a empty level I add a light and some base to
Also, you can turn on the collision view mode in the viewport
That would almost definitely give you a clue
Nope - same on fresh level
Exact same hull collision and floor collision as in my test map
And it cannot land lower than this.
Funnily enough if i take a collision box, make it the scene root and form it to the feet of the heli and use its collision and delete the convex hull of the physics asset - ill be able to land flat on that plane
Lemme commit to my repo and ill show example
Have you considered pledging your soul to cthulhu, or sacrificing some virgins
Sorry I'm not going to type anymore because I don't have the answer
With colbox
I am almost a bajillion percent convinced it's the physics asset being buggy or something
I may have to do overlap events and just disable movement in those axes until no more hit/overlap
Hey, I want to add function in bluperints to the Actor class so it can be called by all actors and inherited bps from the actor class. However I dont know how to add bp function to the actor class itself
You can add custom event are create function in your custom class, by default they are both public and you can call them whenever you want as long as you have a pointer to the instance of this class
This is in another blueprint, add Draw Forward Vector is my function I would like to use in all bluperints of actor. Is this what you meant? Because in order to compile, I need to satisfy the "Target" input, which was my original class. It seems strange to me to get an actor of that class just to satisfy this input, but I'm still just starting to learn.
well you can just make a variable of type of this class and than in level pick it from the scene
But maybe it would be better for you to just make a Blueprint Function Library
There you can create global functions
is this actor dynamic as in you will destroy / create again ?
imo it's better if you just have this one thing in the scene to get actor of class on begin play
and promote to variable
then use the variable on tick
ou yes, this was just example on new empty bluperint, I think I will use function library for these debug functions . But still is this possible to change the actor class's functions/variables so they’re inherited in all Blueprints?
you can make a getter function
in a BFL
you can make an actor that stores all the references as well
prob shouldve went in general but i didnt want to overshadow other people
why cant i import this bp, it was exported from unreal 5.6
In this case it'd be fine. If you only have 1 door type then it's a nothing burger, if you have a bunch, your pointer is to BaseDoor anyway
100 variants with different meshes and materials wouldn't be loaded because you'd never have a pointer to them, just their base class or the class they feed their data into
It's when your design has you holding pointers to things with lots of assets that it becomes a problem
I want to add a second collision source to a character, that only stops the character if it it hits a wall (World Static). But the character ignores the collisions of the secondary collision. Is there a simple solution to have the movement component also follow this secondary collision? Or does it need a custom setup?
afaik the CMC only cares about the capsule really
this is probably C++ contact callback territory
what are you trying to do?
I'm using character sprites as you can see, and I have a more top down camera. So I tried angling the sprites to match the camera and it does look nicer. But the problem becomes is that if you run into the back wall, then they just clip into the wall.
Cause obviously it's still going off of the capsule component.
I don't know C++, so couldn't modify it that way unfortunately. 😅
why not modify the capsule to tightly enclose the sprite?
show it from the game view perspective
Cause if I enclose the sprite in the capsule, it'll be a very wide capsule. Making the distance between characters really big.
This is from camera perspective against a wall.
so would you prefer it to be visible where it is, or not be able to get to where it is to begin with?
I don't want to be able to get to the point where the character clips in
make the capsule visible in this screenshot
Here you go
I guess it's not possible to also use a secondary collision easily. I'll need to think about the angle then. Or be ok with the collisions being the way they are.
As long as it feels fine is the main thing I guess.
I could add manual blockers next to the walls.
im confused
I think I figured out a workaround. It effectively makes the character stand still. There are still some things to work out. But this is promising at least.
if it's singleplayer that's fine
but if it's singleplayer I'd just lose the CMC
you can just sweep the sprite thing around directly
I do a lot of things using the movement component that would be much harder to re-implement myself compared to just working around this one thing.
turn on simulate physics of your capsule and set simulate physics to false in begin play
so cmc would sweep sprite too
Anybody know a fix for this silly problem?
I have an Array Variable of Type UserWidget and use a For each loop with it, now the Array Element will somewhy stay being Wildcard until I connect it to something (like GetClass) which makes it now a Object Reference instead of a User Widget Object Reference thus meaning I have to cast to Widget/UserWidget again to use the Array Element for RemoveFromParent
so the engine telling me "you dont need todo that" is just a lie.
any way to fix this?
ik that this isnt really an issue but its still complaining and generating the Note, so it annoys me :D
Same with this, it just default to a generic Object Reference
is it possible to have a map with 3 values?
like actor actor integer
I feel like I always get confused with collisions and the such.
How do I make a Sphere able to detect overlaps, and call related functions, but not have other overlaps see that sphere, and affect the main actor (said sphere could be large in size)
no, usually you would wrap your value elements in a struct
Disconnect the two blue pins on the second for each loop so they go grey again. Then reconnect the array first so the array element becomes the user widget type.
hm i think i tried this but I'm not sure, I'll see later. thanks for now
How do I set the timeline node speed to be correct on mobile? Because frame rates vary, the speed varies on mobile platforms
The values are already adjusted because it's a timeline. It uses a curve so if 1 second has passed it'll return the value at 1 second. The issue is most likely what you're choosing to do on the update.
Which update do you mean? Why is the speed correct on the computer but slow on the mobile?
does anyone know why Was Component Recently Rendered node doesnt work on laptops with integrated gpus? Im using it in event tick of an actor
When you play a timeline, the 'Update' pin will trigger every frame. The value it returns is based on the time that has passed since the last time it triggered.
The updated pin will most likely trigger less than on PC if its running at a lower FPS (30 instead of 60 as an example), there isn't anyway to change this.
You should see the recently rendered nodes as a 'Was this recently sent to the GPU to be rendered'. Various factors could affect if and when a mesh would be sent to the GPU such as culling.
Note, just because it was recently rendered doesn't mean it was visible. (could have been obsured by other meshes)
The problem is that it doesnt return true when it should. I was thinking puting it in timer by event instead of event tick but Im not sure whether that would change anything. As I said, only on laptops with integrated gpus.
What are you using it for?
When it returns true, I play sound and do a timeline. Also I should mention that the actor doesnt have tick enabled by default. I set actor tick enabled in an event and then set actors mesh visibility to true. Then theres the chech in event tick
So what's the real solution?
Changing its speed to match the platform?
Or using a tick?
Or is there another solution?
What are you using it for?
Whats the end goal? You'll most likely need to go down a different route.
Move the cards it's like playing Uno
Can you show your setup?
The issue is you're logic. Because you're using the actors current location this means it could be affect by how many times its called.
I would cache the actors current location before you start and instead of using a float curve, i'd use a vector curve which would be the offset from the initial starting location.
When setting the actor location, it'll just be the starting location + the location offset.
Yeh, this improves the code, but it doesn't solve the problem
Also a little confused if this is a lag issue or due to movement
connect the array in first then connect array element to get class
is there no built-in function to somehow "blur" or average out values in an array?
It's a frame issue. You're logic you call is frame dependent. If a have X and add 1 every frame, after 60 frames it would be 60, after 30 frames it'll be 30.
What I said would solve the issue as it removes the frame dependent part.
I'm not aware of any myself.
thanks! how can I implement something like that?
Normally just looping through, summing all the values and then dividing by the total number of elements.
However, these might work. 🤔 I think they're structs for the control rig stuff. Not sure if they're editor only or not. (And yes you can do some fancy things with c++ structs)
but you would be averaging out the entire array. I meant more like blurring values across nearby neighbours if that makes sense
Oh so like index 1 becoming the average of index 0, 1 & 2 and Index 5 becoming the avarage of index 4, 5 & 6?
yeah something like that I imagined, there are functions in python I think that do that
maybe I don't need it if I can figure out out to get the interpolated scale of a spline at any point of it, irrespective of the spline point
I wonder if Get Scale at Time function does that
isn't there a get scale at spline distance node?
Yes, it will give the scale at the specified time. If the time it between two points it'll be interpulated.
is time a value from 0 to 1?
yes I just found about it, let me check it out.. you know how it works?
It's from 0 to the duration you set. The default is 1. (I think)
no
maybe the Get Scale at Distance Along Spline will be easier, if I can figure out the distance of the Polypath Vertex
well there may be both, duration may be 0-1, distance is 0 - spline length
do you know if there's a way to tget the relative distance when using Poly Path?
what are you trying to accomplish along the spline ?
I have a spline which has let's say 10 points. Using geometry script I'm converting it into a Poly Path, then I loop over each vertex (around 50 let's say) so that I may construct a ribbon geometry along it's length. It works. Now I'm trying to take the scale at each spline point into account, however there's no parity between the spline point scale and each poly path vertex. I created an index map that tells me which poly path vertex is the closest to which spline point, but that gives me un-interpolated results, so I end up with a spline ribbon which has harsh transitions where scale differs
Example:
Hi, does anyone have any knowledge how to properly make interactive enemy kills, like in Dead Island 2, the one I have uses Simply move to, to approach to enemy, and turns him 90degree depending on his rotation to player, but it does not seem to work properly, for example if you attack on the move. I dig all the internet to find anything an that topic but without success, can anyone help, or point toward direction?
i see so you want the rotation at those particular points
No, I want the scale to be smoothly interpolated
as far as you want the correct scale at that point ?
"then I loop over each vertex (around 50 let's say) so that I may construct a ribbon geometry along it's length", how do you construct this ?
Hi, does anyone know or has any ideas how to make skeletal animation track keep playing or looping while the sequencer is being paused?
I tried using ABP but rejected because there will be too many state.
each vertex is part of the spline ?
It happens in two steps first I define the distance for the inner and outer ribbon points, then in a second loop I build each polygon that you see on the screenshot
The vertices which I referred to are Poly Path vertices. They are created using the poly path sampling funtion
as far as polypath, idk what this is, but you can add points to the spline at the evenly spaced out points
then get the scale at the point index
that's the problem you can't get the scale at a Poly Path vertex, when it's created it doesn't get the scale attribute, hence the problem
but OK, all I need now is a way to get the "distance" of a poly path vertex in relation to the original spline, then I should be able to sample the Scale At Distance Along Spline
ok there is a function that does what I need but I can't find it on my unreal engine version,
https://dev.epicgames.com/documentation/en-us/unreal-engine/BlueprintAPI/Spline/GetDistanceAlongSplineatLocation
that's just great, fml
what version ?
I'm on 5.2.. but no problem I found another forum post, and this worked perfectly
that looks odd to me
isn't there a get distance at point node?
i think your current fomula assumes even distance between all points
if my headache isn't misleading me...
@modern radish
There's a better way to do that. Don't use poly path for this. Sample Spline to Transforms, then Append Sweep Polyline
Append Sweep Polyline was the first thing I tried, but there was no way to use the spline point scale?
Alright never mind, I was inded overcomplicating it a lot, Append Sweep Polyline should work
I cant figure out why the Scene Component is not attaching to the Skeletal Mesh Component.
Im not able to use a socket here, because Im getting an average location of several sockets for that, and have to spawn an SC there and attach immediately instead. Appreciate any help!
I tested it with this, the sphere draw stays there, altough the scene component was attached before, its location is unchanged when Skeletal Mesh moves.
Green is before attach, blue after, so it knows its attached parent but still is not following it xD Am I going nuts here? I thought scene components have a transform and can be used as a parent for actors which are supposed to move
you are using keep world
Should still move with it after the fact AFAIK
ah, i see, the problem is not following
yup tried all the settings there, and removed anything unnecessary.
i know I used this node before and it worked, then I rewrite some logic and since then it didnt work, then i discovered the other add componenent node, and it still didnt work. Could this node which says "DO NOT USE" have broken something in the project?
or maybe it has something to do with the barebone scene component? which means Id have to create my own based on that and switch some things, but yet again it did work before somehow
Try this one and select scene component.
yup it turns into the same node, but has by default manual attachment disabled, but since Im doing manual attachment, I need it checked. But I tried both.
I switched Skele Mesh Hands and Scene Component around and the hands happily dettached from character and attached themselves to where the anchor is.
So when skeletal mesh component was able to attach itself, but the scene component not, maybe scene component cant move after all?
There's one that just creates the component then there's another one that actually initialized it and registers it with the actor.
I can't remember which one it is to be honest lol.
its just one and yeah it turns in the same node Im using, but I tried the other one too
This actually worked before, but since some rework stopped, then i found some info that the one with class selector is the right one if I need a fresh scene component, but yeah both dont work
Hi! There is a way to change the font size of a rich text text block?
Not using the data table
I want in-game to have a small/medium/big font combobox
hello.
so i have a little rocketship moving. if i rotate it with the mouse, everything is fine. but when i rotate it with the gamepad, it rotates AND moves backwards. its driving me crazy.
why does it do that, and how do i fix it?
Im totally blanking on this, but essentially I need to get the Playback to fire not all at once but with a slight delay for the loop, so these caches dont fire all at once. Any ideas on how to do this?
Hi guys, I'm trying to add EXP after the dialogue has finished its cycle. currently you press debug 1 to increase the EXP but i want to increase the EXP after the dialouge has ended by the same increments. I am using this dialogue system from this video: https://www.youtube.com/watch?v=hbs0xaNOeA0&t=293s&ab_channel=GorkaGames
And I'm using this EXP system from this video: https://www.youtube.com/watch?v=_e69mI5VZkY&ab_channel=Lisowi
Adding screenshots of the AddEXP function and Press E talk on player event graph
Hello guys, in this quick and simple tutorial we are going to learn how to make a simple dialogue system in Unreal Engine 5
Check out my Steam Game! https://bit.ly/3rVlXU1
Follow me on Twitter: https://twitter.com/GorkaGames
Subscribe to the channel: https://www.youtube.com/channel/UCv_n...
unreal engine 5,ue5,dialogue system,tutorial,quixel,m...
Hey there, in this video I'm going to show you how to create a level up system.
Support my channel on Patreon / Buy Me A Coffee
https://www.patreon.com/Lisowi
https://buymeacoffee.com/lisowi
You can also support me on
📸 Instagram: @ItsLisowi
"Add Controller Yaw Input" node or its equivalent to the game pad too?
You would need some callback on the dialogue system to know its finished. How is the end of the dialogue handled?
I believe its this in the event graph of the playable character, by pressing E you cycle through the text set in the dialogue string and when it comes to the end the widget with text disapears
in the video he has this example here with a custom event it being the 'Death' Event
Show that bit.
gimme a sec just firing UE back up
starts around 7:07 on this video https://www.youtube.com/watch?v=hbs0xaNOeA0&t=293s&ab_channel=GorkaGames
Hello guys, in this quick and simple tutorial we are going to learn how to make a simple dialogue system in Unreal Engine 5
Check out my Steam Game! https://bit.ly/3rVlXU1
Follow me on Twitter: https://twitter.com/GorkaGames
Subscribe to the channel: https://www.youtube.com/channel/UCv_n...
unreal engine 5,ue5,dialogue system,tutorial,quixel,m...
starts around 7:07 on this video above ^^
Concept/theory question... If I'm making a dungeon generator and wish to have multiple themes, is it more appropriate to have a standalone Blueprint for "Dungeon Theme", which would control the assets allowed to be used during generation, or is it better to just build that directly into the main Dungeon Blueprint as a variable/function? Ideally, the dungeon theme would later be used to also define the types of Room Themes allowed (and also which asset pools they can draw from) for each Room in the Dungeon.
So... Am I looking at...
Dungeon BP
DungeonTheme BP
Room BP
RoomTheme BP
... or still just...
Dungeon BP
Room BP
?
::EDIT:: Assume also that I may later wish to have dungeons with multiple themes.. For example, a castle above ground with a dungeon/cave below.
Part of the reason for my question is that I'm also still unsure how I would go about defining / limiting allowed asset pools based on chosen theme, but my goal is to make it modular and easily configurable so I'm assuming it's a thing I'll be able to do eventually.
Just to clarify, the dialogue system is barely a system. He uses strings for user facing text. 🥲 99% of all user facing text should be a var type of text not string. However, the end of the dialogue is when the UI is removed from parent so you'd need to do something here.
Personally, I'd recommend looking for a better dialogue system as Gorka Games tutorials generally don't scale well.
If something says it's a 'System' and is built in 15 mins you should probably look for something else and save yourself the future headache. 😅
However if you wish to continue using this one, you could add a var input to the 'Talk' BPI event to pass the actor that triggering the dialogue. Then on the player character pas a ref of self through. Then after the widget is removed, you can get the ref and call the add xp function.
I would use data assets to define the themes. In it could be the different assets that can be used by the dungeon builder. With this in mind, you could allow the dungeon builder to be passed multiple data assets.
ok the scene component does follow after all, its the location which is weird.
Im taking all sockets with specific prefix and sort them, Im getting only 2 sockets, and a sphere spawns exactly between those, but when adding the scene component and using the same vector, its offset for some reason.
Its as if the Add Scene Component nodes relative transform location is not the same as socket locations. One of those is probably in a different space and needs to be converted, but this is progress nonetheless
Thanks! I'll familiarize myself with Data Assets.
Hey everyone! 👋
I'm working on a UE 5.5.4 project and using the Game Animation Sample as a base. I’ve migrated the animation system and GAS-based logic into my own project successfully.
Now, my game has a special section where the gameplay shifts into a 2D side-scroller mode (like classic platformers). I’ve already constrained the movement plane and switched to a side-scroller camera setup.
The problem: I can't get the character to walk backwards (left direction) properly in side-scroller mode.
Even though I constrain movement to the XZ plane and disable rotation updates (UseControllerDesiredRotation = false, OrientRotationToMovement = false), the character doesn't rotate or play the correct backward movement animations.
I suspect this is related to UpdateRotation_PreCMC and possibly how the animation state machine blends directional movement.
Has anyone implemented a working side-scroller mode using the Game Animation Sample? Or any tips on how to handle directional movement (especially walking backward) correctly in a constrained 2D setup?
Thanks so much!
Using Get Socket Transform instead of Get Socket Location gave me the proper locations, the SC is attached and following the average. Thx anyone trying to help before.
Question: Could someone give me a hint what this means. It's on a marketplace assets.
It looks like something attempting to create a component but hasn't specified the class. Called in the construction script in BP_Building
Can anyone tell me why this isn't dragging the ragdoll? The line trace is working and the path of the trace works, but the ragdoll doesn't move
- Physics is enabled on the skeletal mesh
_ Collision profile is ragdoll
Are you sure the completed is not called too early (depends on your input action mapping context config ) ? That would set your drag target to none and stop your update logic.
So, I sort of know the basics of blueprint interfaces, but don't understand how to implement them when two or more blueprints need to send information to one another. I know how to make character walk up to actor A or B and then have either of them do something with the same input, but not how to get A to get information from the character and send it to B. For example, right now I'm making a simple door and key system. I planned to have both the key and door interact when the character overlaps with them and triggers the input, but with the door it cannot open until it confirms the key has been picked up, which I was planning to have set as a bool in the key blueprint.
But I don't know how to get that bool using interfaces.
Blueprint delay issue. I have 2 Timeline nodes running from my EventBeginPlay.
Before my 2nd Timeline I have a Delay.
But whenever I enter PIE my 2nd Timeline plays immediately and ignores the delay. Why?
Your misconception is that you 'have' to use an interface.
Interfaces are when you have multiple classes that need to share/implement the same functions but don't have a common parent.
With everything you've described, i'd have a door base class (that all doors will be a child of) with an 'Unlock' function and then a key base class (that all keys would be a child of) that has a variable type of the base door class, ('DoorToUnlock' ) set to instance editable.
When you place a key in the level you can then set the 'DoorToUnlock' to an instance of a door in the level.
When a key is overlapped by the player, it would just call the 'Unlock' function on the 'DoorToUnlock' var.
The 'Updated' pin is called each tick while the timeline is playing. If you want a secondary timeline to player you can either move it to the 'Finished' pin on the first one (if it should play after the first has finished) or use a sequence node at the very beginning and have both timelines start from the sequence.
Thanks!!
Hmm. Still not working. I also tried a Sequence node and switching both Timeline pins from Play to Play from Start.
Okay, I'm still a beginner so bear with me. I understand parent classes and inheritance but not quite instances. My understanding is that the door blueprint would have three requirements to be opened:
-
The character is overlapping
-
The trigger must be pressed
-
The key for the corresponding door must have been picked up.
So what I have is my 3rd person BP, which has the intereact action I made (IA_interact). That action is connected to a Sphere Overlap Actors node, which is then connected to the interact function in the blueprint interface (BPIF_Interact). Within the door blueprint I planned to have the door actor move/open when the interact signal is sent, but only if the player has gotten the key. For the key I planned to have the actor destroyed after it sends a boolean variable to either the door or the character to confirm this, but I don't know how to send that boolean. My understanding was that the way to do this without casting was to use interfaces to send this info between the blueprints, which I'm not sure how to do.
I understand that I might be doing this in a completley wrong way. I'm just trying to understand not only how I can implement this but why it works.
An instance is each copy of your bp that exists in the world, whether placed or spawned.
Okay, I understand this part
Each instance holds its own copy of the bp’s variables so you can have one door’s bool variable value be true and another’s be false
Which part do you not understand ?
Just how to send the information between the door parent class and the key parent class.
Is this just a scenario where you're supposed to use casting??
Yep that’s definitely one way.
Get the ref from your overlap and cast to ensure it’s the correct type, then go from there
I just thought that using interfaces is more efficient
It’s not
It’s usually just more confusing
Only time interfaces are ideal is when you want to interact with very heavy assets without loading them
A door that is placed in your world is already loaded
Okay, so then what about a game like an escape room with a lot of interactable objects?
That’s ok too. Interfaces are one of the ways to communicate with other bps, but inheritance is not something you should be avoiding. You can always have a BP_Interactable and everything can be a child of it
Even stranger, if I disconnect ALL input pins from my 2nd Timeline it still plays on PIE.
Its almost as if it 'remembers' that it played on BeginPlay.
Will try starting with a blank Timeline.
I think I see what you mean. But what if you have a lot of different classes that need to communicate with each other?
Hierarchy, base classes and components. Interfaces should be the last option when others aren't suitable.
yo guys why does my spline point not generate in a striaght line, if i change the duration in for loop it breaks differntly. Is it soething to do with get laoction of spline?
when you add spline point
are you trying to add to end ?
because 0 is the first one
I'm trying to add it dorward
How do I update "get location", I think I can reuse code from before
so when I run the Streaming Pool size command thing what would I set, my Dedicated GPU Mem is 8GB so would I set just under that or would I be looking at a different value as the max ??
im tryna do it adds 500, then adds 1000 ect, maybe it will work
Less go got it working by replacing get loaction wit hget tangent
but if i change for loop time it breaks?
its maybe my mesh
Definitely under that. 4-6GB is prly fine, depending on how heavy your assets are
i've done 2GB for now cause the stats only show about 500 roughly is required so
So many people are saying different things... 😵💫
If you don't know when to use the different methods, it probably doesn't really matter too much.
They all work.
They just have different downsides.
And sometimes the choice you end up making, even if you're an expert, is a pretty fine line.
And sometimes you use all of them.
A class that inherits a component and adds functionality based on an interface.
I'd use an interface for something that might have completely different implementation, but a similar api interface. A component when the implementation is owner-agnostic and can exist in its own little world. And inheritance when it's a core functionality of a specific hierarchy of objects. Something like that, but there are always exceptions and use cases.
You wouldn't use an interface here unless you intend to make a general Interact interface, where the door's version checks for a key and then opens.
If you were going that route, you'd make an Interact function in InteractionInterface and, importantly, PASS OVER SOME INFO.
You'd want the info to be a reference to the character that's doing the interaction.
In your door example, it'd be like this:
Character:
????? -> call Interact on thing
Door:
Interact -> check if InteractingCharacter has key (whatever that means) -> open
Hey, I would like to make function which detects if pin is connected and make branch based on that. Is this possible to detect if input pin is empty or connected?
what kind of pin
input for my bluperint function
What's the actual thing you're trying to do here
What kind of input?
a bool, a float, an object ref?
Is there a difference here? I'm wondering about making reusable tools in the future. For example, in this case, I would like to pass either a Target actor or a direct position. This is a simple example, but in other software where I'm creating tools, it's common to check if an input is empty and then switch the logic based on that.
check if target actor is valid
if target actor is valid, use the target actor path, if not use the location path
or have a bool input
yeah its just meant to be a quick one for proof of concept. sounds like the last line is what i need, im very new to this. you able to give me an example?
I'm sort of trying to just understand at least one 🥲 for example, in this instance, how do I send information between 2 or more blueprints without casting? It would have to be intheritance or an interface right? But I'm still enough of a beginner to not be completely sure of what I'm doing for either method. Not that I don't know what inherited classes or children are, I'm just missing the process for knowing how to fit the pieces together
Do you know what casting does?
You need to stop worrying about casting for a start. Cast away. Just try to cast to parent classes as much as possible.
I do to an extent, it just loads and basically references a specific blueprint you're trying to get right? But by doing this it loads those right at the beginning of the level, even if they're not used till later right?
I mean, it does do that, sort of, but that's more of a side effect.
I'm just confused because I'm going through AskADev's series right now and he's talking about why casting isn't always helpful
Can you explain what casting does to a variable?
So I'm trying to understand the differences
Or an object.
I thought you had to promote something to a variable after you cast it (I also love your pfp)
(Thanks) but that's not explaining what cast does.
My use of the word 'variable' there was probably a mistake.
casting checks if the class is of the type
Yeah! But it still loads a reference or something to it
It doesn't load anything. It causes linkers. If your "Casting is bad" youtuber isn't saying this correctly, he needs downvoted into obscurity.
So if you want to send information between 2 blueprints, you need a reference in one blueprint to an instance of the other.
Do you have that?
Ah- I was actually following along with AskADev's blueprint interface tutorial...
Audio Begins at 3:15, use the chapters to skip ahead!!!
You need Blueprint Interfaces! Maybe you don't even know what they are or you have a foggy understanding, but we are going to go through examples step by step to help wreck the learning curve.
🎓 Blueprint Actors hardwired method
🎓 Simple enhanced input key implementation
🎓 Blue...
27:25 This is where he was talking about it
I do not, though I know I can add one. I guess I'm just still learning when to use casting and when to use interfaces, as I understand that casting takes a lot of memory, or at least that's the idea I got from this video above.
(btw thank you everyone I know I'm still a noob at this)
I would look at the basics of what you actually have to do before you decide how to implement it (inheritance, interfaces, etc.)
The guy isn't wrong at that timecode. Linking blueprints together like that isn't a good idea.
I assume he's going to tell you to add an interface, cast to the interface and call the common method defined by the interface.
Okay. He's not doing the ususal "avoid casts at all costs, love interfaces cause my friend said so". But he's also still fairly wrong here. Using his phrasing. You're "painting yourself into a corner." if you don't make this compositional. Interaction has a lot of state. And if you use interfaces you're making your rolling door, switch, etc have to specially implement the ability to be interacted with even if you call the same interface function. Essentially you end up duplicating the same interaction code for a lever and a lightswitch. A single component class that can have data set on it can handle anything from single instant interaction to hold interactions, to multiple use required interactions(Like four people pushing a ship anchor lever to raise it faster that one). All of these work identically with a little bit of data difference and most of them require some state for the interaction. So interfaces are not the way here either.
Unless you use the interface to interact with a component 😂
He did mention inheritance and components as solutions as well, to his credit.
Still. I wish people would stop this interface promotion. Like make decent reasons why you should use them. This is a really shitty example and it causes confusion.
That's true enough.
i think the reason is to keep it clean, not to stop casting
But if it's the difference between a light switch and an enemy, that might have very different interaction mechanics, so maybe an interface is warranted at some stage.
you could have a bunch of casts, or just an interface function
But again. Composition. Get the component from the actor and call a single interact function.
No casting at all.
If you don't know how it all works, though, you should probably try all 3 methods. So you know.
But, yeah, composition is probably the way to go in this case, I agree!
I'm making a game and got a question about organizing blueprints/systems that are only used once or in a specific map. Like, say I have a trigger box that turns off a light or closes a door when the player walks into it.
Should I bother making a separate blueprint for that? And if I do, is it better to just put it in the main blueprints folder or create a subfolder for that specific map and keep it there?
Sphere trace out hit impact normal is not normal. It is throwing off my calculations, why is the impact normal not normal for my sphere trace?
Also to @maiden wadi and @lofty rapids : thank you so much for the suggestion, I'm still fairly new to this, so I appreciate you all taking the time to clarify some things. Would you recommend any other resources when it comes to getting blueprints to work with each other/interfaces vs casting/composition? (I'm actually not quite sure what composition is)
Composition is the idea of using components to handle the logic. In this example an interaction component can be added to a drawbridge lever, to an NPC, to a light switch, etc. And you interact with the component instead of the individual actors.
Inheritance would be adding the interact to a base class. But that is not feasible because an NPC would be a character, and a lightswitch would be a normal actor. Thus you cannot have a base class for both.
Interfaces would patch the interitance issue by allowing you to put the same event on both the NPC and lightswitch. But now you have to code the interaction in both the lightswitch on NPC which means at the very least partially duplicated code.
Composition allows you to place the component on both the lightswitch and the NPC, and run identical code with settings on each and do whatever you need in the actor when it's interacted with via like a delegate in the component that the actor can listen to in it's event graph. Which means the only special code you need to add is what happens AFTER the interaction happens, such as the toggling of the light or the NPC focusing you and showing a trading widget or similar. But all of the checks and interaction state can remain in the component.
And this gets even more complex if you start adding in things like ability systems, but that's not really a talk for this.
you might want to look into OOP principles and common design patterns, theyre really helpful. Its great that youre thinking critically, because understanding these core ideas will make things a lot easier and support your growth as a dev in future
What's the best way to learn blueprint and also do any of u hv any study mats or youtube /udemy suggestions
Question: I have a look back mechanic similar to Outlast, and it works fine except for after sing it, my camera lag from my spring arm is back to default, and throws off the feel of the movement. How do I correct this?
Nevermind, I figured it out. Just needed to turn set rotation yaw to false
yo guys, this glitch comes up after 30-40 secs, the fps slowly drops from 30 and glitches out when it reaches around 8fps
there was a runtime error which use to come, i fixed it, but the problem is still there
😔😔
One thing you can do is make a generic "light switch " actor class, add it to the level, and then edit the variables of the instance to point at whatever light you want it to control. Softpointers are your friend.
Authaer is correct. Components are best used as a first resort to making actors behave in useful ways. The function "FindComponentByClass" is your best friend.
Oh wait, the bp version is GetComponentByClass
My systems got a massive step up when I started using inheritance/hierarchy and actor components more over interfaces. Less buggy and easier to follow.
It's far too easy for someone who's new to UE to abuse interfaces and get themselves into a right mess. Often using them in the weird places.
Interfaces of course have their place but this isn't as easy to identify when you're new.
got as far as adding the input not sure what to do on the next step, apologies really new to blueprint systems :/
Hey I have placed two cubes in my scene, one cube y rotation is dependent on the other cube's y rotation, however, when I rotate the cube that is to be followed, the dependent cube doesnt follows its rotation as it should (It moves in to-and-fro motion) - I have read that Unreal engine in auto converts the Rotator in Euler angles, I have searched alot on this particular problem but am yet to find a fix, how do i solve tis can anybody help?
Anybody know if there's a way in blueprints to get the animation time until a notify fires?
euler strikes again ?
Hey, I'm wondering about good practice here.
I have a blueprint called BP_BlasterBeam, which quits the game if the TargetPawn is hit.
I've noticed that I want to use this functionality from selection in screen below in both my pawn and enemy blueprints.
I can't use a function library for this (because of this spawn actor), so what would be the best way to reuse this functionality?
I'm fairly new to OOP, but my intuition is to add this function to a parent class that both blueprints inherit from that's the Actor class.
Yeah 😔
This looks like something that would be on a weapon class (or similar). Also is there a reason the laser beam isn't a particle system?
i have a for loop with delay, but if i change the time delay it breaks in a diffenrnt way every time
Show what you mean by 'ForLoop with delay'.
it has a delay node inside
Is this a macro you've created?
The top delay shouldn't be needed. Also, latent nodes (such as this) will only function correctly if used in the main event graph.
The better solution would be to use Set Timer by function name
oh ye i forgot to remove it
Anyone ever experienced an issue where setting the render translation on a hud element results in the original position of the element remaining on screen? I'm trying to update some elements of a crosshair that I have and when they move, they are moved as expected, but it appears to be a copy for whatever reason.
You most likely have a duplicate widget/element.
Not from what I can see. I have a center dot and 4 bars representing the crosshair that are all under the same canvas panel
but I might be misunderstanding it
they are just "images" but I dont have an actual image for them, just filling them with a red color for now
I might be creating the hud twice? Let me double check.
that might be it!
this is a networked game
That would be my guess.
duplicates felt like the obvious thing, but I just stared myself blind on the hud blueprint itself
it does seem like I add it to viewport multiple times due to some mistakes so I will dig into that, thank you
Also, you should avoid using Canvas panels unless you absolutely need to use one. Here you have a canvas panel in a canvas panel.
I thought canvas panels were just container boxes to group things together and align them relative to the canvas box? I might have misunderstood that too. UI is the thing I have the least experience with.
Canvas panels cause everything to get redrawn. so the nested canvas panel will redraw all it's children, then the outer canvas panel will make the nested canvas panel redraw again (with all its children). Over using them can cause frame issues when displaying UI.
I got it to work now. Im not sure why the possession event in the player controller is called multiple times though so I need to check that.
ah, good to know
Overlay tends to be a good option for the root of a widget. Then you can use horizontal/vertical boxes to help divide up the space as needed. (there's other options too)
I'll take a look at the documentation. Appreciate the help!
This is a good one by epic. It goes over the canvas panel thing as well if you want a more detailed explanation.
thanks again, I defintiely will take a look
"The fundamental issue is that you cannot get non-normalized rotation from any Unreal function. You must avoid reading the spinning object's rotation entirely and instead share the rotation data through variables, events, or components." -Ai
Bumping this hoping someone might have an idea for me.
Would appreciate some info, I'm trying to render a post process in display resolution even though I'm using a lower rendering resolution.
Hey, I'd like to use an Input Action, but I'm running into an issue:
How can I set the trigger values inside my Pawn blueprint when using this action?
I see there's a way to set the trigger array, and I know the value I want to modify is at index 0, but do I really have to loop through it and compare each one? That feels kind of hacky. (how to get names etc?) Is there a better way to directly change the value in the trigger array? In this case, I'm using a Pulse trigger and would like to change the interval of the pulse inside this blueprint.
Guys i need help. I new to unreal engine, converting my fps to multiplayer but facing an issueb
Unfortunately, that's the only way I found to change it at runtime
If you can describe the issue in more detaisl maybe I will be able to help
there are two things in my game, that is BP Weapon Pickup. In Weapon Pickup, there is an event called " interact."( Interact is interface). And it is attached to Spawn Weapon. (Spawn Weapon is basically the event in my BP Chandra [bp chandra is my meta human]) Then it is attached Destroy Actor, and then I am printing Destroy Actor fir be dugging. So, in BP Chandra, Spawn Weapon is connected to RPC Server Span Weapon. (RPC Server Span Weapon, which is only runs on server,) is connected to RPC Span Weapon. RPC Span Weapon is basically multi-cast, and it is connected to the rest of the logic. So, the issue is that everything is working perfectly fine in my server. But, in my client, the actor is basically holding a weapon, and it is working fine. But, when a weapon is picked up, it must be destroyed from its original position. Because it has been already attached to the character. Secondly, when I see from server, the character remains empty handed. What's the issue?
If you're new and haven't messed with multiplayer before its quite the learning curve.. your first thing to do should be to read the network compendium about 100 times until it makes sense - #multiplayer message - Also read the stuff thats pinned in the Multiplayer channel
In simple words,
Why These Two Bugs Happen
❌ 1. Weapon is not destroyed on pickup (on client side)
This happens because the DestroyActor() is running in BP_WeaponPickup — which only exists locally on the client, and is not being destroyed on the server.
❗ Even though you're calling DestroyActor() after calling SpawnWeapon(), that destroy call runs only on the machine that received the interact input.
If that was client: it destroys it only locally, not for server or other clients
If that was server: it works
but shouldnt this be so dead simple? why is it made so complicated?
You're better off showing screenshots of your code rather than trying to describe what it does as its much easier to follow.. Your interaction stuff should be happening on the server and i dont think spawning the weapon should be a multicast either, you want the server to be the authority and decide when a player can and cant interact and you want the server to be responsible for spawning actors and then replicate that down to clients, you dont want clients spawning stuff unless you're not concerned about potential cheating (like a co-op game)
Also converting an existing project to multiplayer is difficult and Epic themselves recommend that you build your games with multiplayer in mind if you plan for it to be multiplayer rather than making it work for a single player and then converting it
Alright
I feel like this statement applies to coding/game dev as a whole if im honest
Because what we want and what we think we want aren't always the same thing. 🙃
hi, small problem
line trace by channel, how to get the hit material?
hit actor -> get material
absolutely correct
?
Pull from the hit component and cast to 'Mesh Component' and get the mesh from that. Note however, that a hit component might not always be a component that is a mesh. (Such as a collision volume)
I read somewhere that's its bugged and you shouldn't use that. Try variation of AddRotation instead
thx
oh really? is bugged?
That's what I read somewhere few months ago, but I'm not 100% sure
so how do we use the variation of addrotation? keep adding delta rotation in it every tick?
let me think a bit, I will test few things out
Does Set Timer by Event out pin not work?
Why?
It does not print hello
So it seems like it is not called
Show what you have on the left on the branch
Hello. I'm using the new Twinstick template and found the firerate is controlled by this Interval value in the triggers of the Fire Input action. Is there a way I can change this from my characters blueprint say when I pick up a new weapon? I have a weapon setup all done with each weapon containing a float for the firerate. Thank you!
The only way I know to change that runtime is to iterate through the triggers and find the right one (or get the first if you are 100% sure there is only one trigger), then access the interval and change it there. You are doing it from Input Action in the event graph. But keep in mind that it's static, so it will be changed everywhere, not only in the instance
Thanks that worked really well. I'm iterally only using thew pulse for shooting so I think it'll work okay, thank you again!
So I have been learning Blueprints for a bit, not to say I'm good but I managed the basics after a week or so of breaking my head against a monitor.
Here is where I struggle -- I have a drone that sprays water (using a Niagara fx system). I want the ground (or, an object hidden to the player in my case that is a fake ground, seperated into different segments) to basically recognize when it is being sprayed-- and after X seconds of spray actively hitting it, it basically grades the player. (i.e. if the player sprayed all patches to a 100%, the level is passed perfectly, etc.)
Right now I am only looking for a simple one ground patch version ofc, that just recognizes when spray hits it and starts recording time.
P.S using 5.6, and feel free to send msgs to my pms if this is a bit more complicated than a "do that" or such so. happy to provide more details.
Anyone know why I get these weird holes in my Nanite landscape in my packaged build in the steep areas? (First image is packaged build and second is playing in Edtitor.
(Unreal engine version 5.3 by the way)
Probably better to ask in #nanite instead of #blueprint
https://youtu.be/DuDUyr2WQBE can someone help my mdoel jsut breaks, just watch first 20seconds i realised that last minute doesnt mtter
goes forward finre then does this
Your last point is rotated 180 degrees
ye I dont know why
i have a BP struct that i want to replace with a Cpp created one. the BP one is being referenced by many bps and im trying to find the best method to get these two structs to be switched... im assuming i'll just have to go through one by one and manually replace and clean each bp but wondered if there was a better method of approach
any help?
how can I load those two async at the same time but only move foward when both are completed?
I don’t think you can load them simultaneously, at least not from bp. But as for only moving forward after both are done, that’s pretty straightforward, just connect the second async node to the completed pin of the first one
Is there a way of doing this with cpp?
There’s no real multithreading in bp, you need cpp for that
Probably yeah, you can likely put them each on a separate thread I’d imagine. Try #cpp
tks
create small array and set values on completed, timer to check and continuje code if both values in array = true
but i don't know if extra checks are worth it, just connect them like other guys said and call it a day, probably some small objects to load so no point overengineering it
You can use the Gate macro (probably two of them) to detect that both inputs have occurred, and only then continue execution. You can bundle those into a macro for easier reuse
never used this macro, how would it work?
What is the Gate Node in Unreal Engine 4 Blueprints?
Source Files: https://github.com/MWadstein/wtf-hdi-files
tks
Struct redirector is what you're lookin' for. Then you'll have to go through and save all the BPs that have the struct. This updates the BP to use the native struct instead of the BP one. Then you can safely delete the BP struct.
It may or may not work 🙃
This is also part of the reason why it is recommended to create all your structs in C++. You don't need to know too much about C++ in general in order to do it and it saves a lot of headaches down the road.
lmao , good to know but yea only just started making them in cpp not too long ago, but it's actually much better, and im enjoying that process
is it recommended to have the bps all up or have them not all up before doing such a thing tho lol in theory, i know it could all fail and break, im willing to deal witht hat
I don't understand the question. Sorry. What do you mean "have the bps all up"?
i mean should i have the actors that are referencing the struct opened in the editor or have them all closed (before / during the re-referencing process)
Doesn't really matter. The BP assets just need to be resaved.
ok cool, yea not embarking on that right this minute but will be soon and wanted to know a good appraoch, assuming there will be things that break regardless. as there are breaks, etc, so will have to be present for that
Heyo! Where should I save map details for things like broken statues, levers that open locked gates, etc? Right now I have a Save_Game that keeps track of save slots, and a Save_Character for each save that holds character details. Should I just add a function in the Save_Character that saves the map details instead of the character and just call one the other or both when needed?
I plan to cast to the game instance to get the Save_Character to check the details of the maps in the level blueprints on load, then set the values that way. Does that check?
Ahh, maybe I should store that info in the game instance before passing it to the save file? Like if it needs to be reset cause the player dies before a checkpoint?
Can anyone tell me why this isnt working?
I am wanting to get mesh references from the data table and update them in the construction script.
The data table is referenced and populated with meshes
If i use a map of the building data struct this logic works fine. But using a data table in the same way doesnt
OK. Its something to do with how I get the row name. Converting from enum to name breaks it. But if I put in a literal, the code works
Got it. Need to convert from enum to string then to name!
Don't do this. Enum names are debug only. Make the datatable rows integer based from 0 to EnumEntryCount-1 and convert the enum to a byte and then to FName. It's much safer.
Or even don't use an enum. This looks a lot like gameplay tag territory if you're using it to look up things in a datatable by a value.
Hi, Can someone please help me work out this math, I have been trying but getting brainfog with it xD I have 5 hearts (Similar to Zelda) and Player Health is 100 and I apply 30 dmg which leaves the player with 70 which should be portrayed as 1 and 1/2 heart missing as each heart is 20. Any help is appreciated thanks! (I am using multiple progress bars here)
I can see that its outputting 1.0,1.0,1.0 then 0.0,0.0 (Where it should be (1.0, 1.0, 1.0, 0.5, 0.0)
Realistically. I would advise doing this in a material. Much easier to control with parameters and less complication. Plus it's insanely cheaper with one image widget.
But the issue you're facing is likely integers. Convert them to floats before any math.
You can't get 0.5 values from integer math.
I think its because 100-30 = 70 and 70 / 20 can go 3 times.
Ah maybe.
I have no clue how to do this in a material xD but will definitely look into it.
thanks for the help !
that was the problem thanks @maiden wadi
Not sure why I didnt think of that in the first place, Damn brainfog 😄
😄 I feel that some days. Happy it worked out.
Hello, I found out that after Upgrading from 5.4 to 5.6.0 my Steam achievements no more achieveable, I found out that they removed "Write Achievement Progress" and replaced with "Write Progress" instead, I replaced the node and entered the achievement names instead of ID's exact to that I have in Steamworks dashboard, but its still unachieveable =/
Do you have C++ access to debug this a bit?
when debugging I found suspect loading text: "SteamInternal_SetMinidumpSteamID: Caching Steam ID: 76561198087189530 [API loaded no]"
You could also check out your logs. Look for LogOnlineAchievements. Make sure it's enabled before testing.
There's a ton of error logs in this function for Steam's achievement system.
i have this base class bp w these interfaces, but when i change a bool on it to true, a sphere trace i have running from the player that checks for the interface prints off false, when i use a child class bp it does the same even tho the interfaces are inherited
I'm glancing through the code on this, and this only seems to print if a bool is not set to true. And this bool only cares if there are any achievements listed. I'm assuming this is your commented out Achievements under the other configs there.
Do the children override the interface functions? If so anything you do in the parent won't matter.
so they removed Achievement_id as feature from blueprints but still use existence of them as a way to check whether achievements exists in the game 🤦
Unreal™, right?
TBF I don't know much about the achievement stuff. One of our other programmers set that up in our last project and I've never really paid it much mind.
no
Odd. Not sure then.
i mean i could just duplicate the base n fix what dosnt work, was just trying to keep the logic in one class if i was reusing it alot
it was working, then just stopped but i hadnt changed anything before it stopped maybe 5.6 bug?
now this
I don't have the editor open atm. Updating to latest main so can't open it for a while either. 😄 But can you check if there are any calls related to achievements like a GetAchievements?
That error is because the player ID isn't mapped correctly and the only place it seems to be done is in a FOnlineAsyncTaskSteamGetAchievements.
So you'd need to "Get" them to make this update before writing them apparently.
One moment, I'm downloading the Engine Source to make it easier to find all the bugs
Sec. I'm trying to hunt down where this is ran from. Async tasks have a lot of indirection sometimes.
Maybe Cache Achievements? Can you try running that before any other achievement stuff?
already tried in blueprint above of this.
I'll try to find out which of these 4 different functions actually invokes the error, marked them :3 Now I also use magic of code even though my whole project been developed codeless
now I finally fixed it, so even though they removed achievement_ids they are still required for correct work
if you meant the struct being saved after changed but nodes that referenced it not compiled bug, I think there's a solution from youtube
save everything before you make any changes, change the struct, only save the struct (don't save anything else), and then close the editor to have it recompiled
Hi, the change event of the selected item is not triggered unless I click on the textblock. I added a button to use Hovered, Pressed designs. ZOrder value is 1, HorizontalBox's is 0.
I made the button transparent, I increase the alpha value a little when hovered over it and make it orange when clicked. But that widget does not detect clicking when there is a button. If I remove the button it detects perfectly but only if I click on the Textblock.
How can I solve this problem?
Hi
has anyone here before tried to do smooth transitioning effect with a character post process? or level volume post process?
found here some people trying to do the same but none of their answers were applicable, maybe its my engine
or maybe something like this?
this is the entering into the post process kind of logic
Move the for each loop to the after the 'Updated' pin on the time line.
Is there a performance benefit to defining a function and calling it multiple times, over copy-pasting the function's graph multiple times? Just curious.
Reduced file size. Granted this can be negligible but in large classes, it can make a difference.
Other than this it just helps with maintainability. Imagine you want to make a change to the logic, if you copied and pasted, now you have to go make the edit everywhere you did it. If it's a function, you just update in one place.
Plus functions can be overridden in a child which can allow you to expand/build on the existing functionality.
like this?
yea.
but it doesnt wor k
I see, thanks for the overview 👍
Whats the blend weight for the PP materials? You would normally just lerp this between 0-1 if you want it to transition. You can of course use the material as well but the blend weight would need to be 1 so its visible.
Is this the blend weight?
Yea.
This is how my system works right now
I have a Blueprint box which i overlap and then that means I entered water
and another one which I wanna use for when entering the really hot zones, like desert
the desert needs to have really high heat so thats why Im creating this post process
but there is another way I can do this too
and another way is with a regular post-process volume
so one way is with this yellow box blueprint that has a tag
PP volumes will automatically apply their effect when the player enters them.
yeah, so does that mean this will fade it anyways?
I tried to do blend radius to 4000 before and still didn't work
note that I tried this both on P.P. Volume as well as my blueprint box
Yes, that's what the blend radius is for.
the blueprint box works better, but the only problem I seem to have with it so far is just the fact that it automatically ends overlap imidiatelly upon me entering the post process, so within fractions of a second it will exist, and because of this I decided to turn off this or disconnect it
but it didnt work 😂 😅
ok maybe I need to try it again ♻️
so instead of 100 what would you put it as?
As an FYI, the effect happens with the editor camera. I would start by applying the affect and enter the volume to see if it looks the way you expect. If not it's most likely an issue with the material. If it looks good you can start playing with the blend radius.
this is my material
I'm not a material expert but I can't say I've ever seen the Scene Texture node used where it is. I don't think it needs to be there to be honest. (Maybe it does but hey lol)
Im also working with this intensity parameter and it seems to work just fine ✅
Make sure the intensity is set to a value where its visible. If this is 0, there it doesn't matter what the PP volume does as it wouldn't be visible.
its always visible
it just doesnt animate, so you enter from 0 post-process, -> to BOOM! 💥 suddenly youre in the desert zone, and on that BOOM! 💥 transition thats too sharp if I use a level volume, then the transition will look even worse 💩
with a blueprint volume 🧊 like this, it's not too bad but it either exists too quickly to the point where its not visible, I think because of the end overlap, it goes to this thing right here:
and so it disables itself too quickly
also I did make sure its not visible, initially it is visible
because I tried disconnecting the bottom one right here
also on begin play im creating and setting this thing right here, but it isn't doing anything
Is anyone familiar with the Movie player blueprints system in Unreal Engine? Im currently trying to play a movie in the widgets but it consistently fails to rewind and begin playing the video in my game. But the widgets are able to be opened up. When the desired effect is to play a video upon constructing the widget. Im using a .mp4 file format encoded in H.264 and followed the documentation provided by Unreal but nothing appears to be working. Ive got the Electra player and codecs installed in my project too.
https://www.youtube.com/watch?v=PWxwSb_kt98&t=83s
try to follow this tutorial - it helped me a lot
[This tutorial is filmed in Unreal Engine 5, but will work for Unreal Engine 4 if you use the older media players]
In this tutorial we will be making a TV/Screen in Unreal Engine 5. This screen can play video encoded in MP4 and sound that comes with that video. This uses the new Electra media player included in Unreal Engine 5, so that we fix m...
Also, you probably want to be using bink media, much more efficient for video sources
Hey guys, hope all is good! I am having lots of issues witht he product configurator. Whats supposed to be a simple migration of the “ProductConfig” from the product configurator template to my project (5.6) has turned into a nightmare.
After I migrate the files, create a variant manager > add everything i want to it > make tests on the viewport (all works fine) > i drag the BP_Configurator on the scene > drag the VariantSet on the scene (everything btw is on a fresh new level) > press play and all the buttons are just white boxes and I get a lot of run time errors.
I tried this on a blank project as well (5.6) with just a cube and a plane and added just two camera views on the variant set and atill the same issue.
The only time i got it to work correctly was when I built everything on a new level but inside the “Product configurator template” but I cant do that for the final since this is a client project..
Ive been trying to troubleshoot with “ifValid” and etc (will attach screenshots for all of these) and it still does not work. Me and chatgpt + gemini have been working hard the past few days but no hope..
I was following this tutorial to the teeth but it seems like im the only one with this issue.
If someone can help id be very thankful! 🙏🏼
Thank you all! I followed that tutorial and it seems to not still be working. Im going to try out Bink now
I'm so irritated that Epic didn't make this more of a default and integrate it a little better when they bought out RAD. Bink is so amazing for video stuff even if it's slightly unwieldly without some structure.
asuming you have a camera boom arm, rotating that would do isnt it?
It's really frustrating 😆
I tried to make an npc that looks at us when we are not looking at it, but for some reason the bool does not turn false
I took a weeping angels video as a reference but the video works and mine doesn't. everything is exactly the same
Did you see if it's getting correct Get Player Character and it returns any location?
If that video tells you to put a delay on event tick, you should try another video lol
Even if you do it with a delay on tick. The logic is wrong. It should check the bool from the trace and if true on a branch then set the bool to explicitly true and then delay then set explicitly false. Only place the trace bool should be used is in the branch.
Using a node's state from before a delay, after a delay is just as dangerous as pulling from other execution lines.
Perhaps this one will be better for you.
In this video, I go over how you can create a weeping angel/creaking type of mechanic inside of Unreal Engine using blueprints. This is a mechanic where something stands still when being looked at. So grab a snack and enjoy.
3D Graphics: Crash Course Computer Science #27:
https://youtu.be/TEAtmCYYKZA?si=EEDBDW-MzQCi4oQf
Want to continue the di...
Also fairly sure it should have been a retriggerable delay.
Hey I was wondering if anyone would be willing to hop in a call and help me out creating a 'time spent in air variable' for my game as I want the characters float animation to only play if they are in the air for a certain amount of time otherwise it plays at the end of small jumps and creates an awkward looking animation
Not really willing to go into a call. But you should be able to handle this in the character class off of it's movement mode changed. If they are falling, set a float to the current game time. In your animation bp, you can get the time in air by checking this as CurrentGameTime - TimeStartedFalling.
Appreciate it thanks
Wes Bunn showcases how to do this in this livetraining.
https://www.youtube.com/watch?v=wyC5vl64V9k&lc=UgxwI88iH7TSge5gcTR4AaABAg
Sr Training Content Creator Wes Bunn shows you how to add drag and drop elements to your UI using UMG. This stream is a must see if your game uses an inventory system and you want a fancy interface for managing it!
Missed the reply, but ⬆️
Thanks, i'll see
why is my anim montage not playing? i have the correct skeleton and i have an animbp for the fps hands
Either the montage is not set up correctly to play with the skeleton. The AnimBP does not have the montage Slot set up. Or you've somehow overridden the slot in the animbp with something else.
is this the setup i need to see if my actor is facing along the y axis
This will tell you if your character is looking north for instance, if that's what you're asking?
is it the general direction of north or a super specific angle
Generally. Since you're only checking 0.9. 1.0 would be precisely.
hello. i hope you are well. how would i plug my midi keyboard input into fusion sampler in meta sounds ? i ve tried to do it my self this is the best ive got , jus tgetting a float from player controller midi input but i dont know how to play a note with fussion sampler.
Hi does anyone know how to remove the local to component variable as its messing my logic up? I am confused how to merge blue pins with white pins without a conversion node? thanks !
Yes that will let you know if you're within 25.something degrees of facing y
ty
hey i have this actor i want the player to interact with and attach to the player, it works, but sometimes when the player gets attached the movement gets messed up, what could i do to avoid that?
Remove pawn collisions from the picked up object so that the character's capsule can pass through it.
still does the same
What did you change?
Check the charcter's Capsule and make sure that anything the capsule blocks is not blocked here.
huh?
Your character has a capsule as it's root component. It's what moves the entire character. If something is blocking the same thing that the capsule is blocking, the capsule cannot sweep through it and it will treat it like a wall.
So essentially everything but visibility.
so what do i change?
The picked up cube needs to not block anything the capsule is blocking. So all of those channels the capsule is set to block need to be ignore or overlap on the cube.
Does that other actor have any other primitives?
It has two other primitives on it. A trigger and a box collision.
they are set to overlap
i removed the box collision and now its not doing that, but i need the object to have collision the player shouldnt be able to walk through it
You may need to do the collision change on pickup. Because the player needs to walk through it when holding it. Like set the actor's collision to disabled on pickup, enable it on drop.
Cause the issue is that the capsule sweeps as you're moving. If the object is say... 20mm in front of the character's capsule, and your capsule needs to move 50mm per frame to keep it's speed, it can only move 20mm per frame due to the box being where it needs to go. Cause the box is attached, so the capsule will move first and then after that the box is moved since it propagates through the attachement hierarchy.
Set Collision Enabled I believe.
ah that makes sense
may not be an issue but the mesh not having collsion when held may be an issue if the player takes the item while held to an area with another static object, wont the held mesh clip through the other static mesh?
It will. I've never personally looked into how people handle that issue easily. I know a lot of games simply ignore that and just accept the clipping but some do somehow limit the player's movement. Force would be my first guess, but it gets costly to do those kind of checks so not really applicable in a lot of multiplayer games or games.
my workaround idea was to have a sphere trigger that if the player exits it the object auto despawns and spawns back where it was first picked up
but that dosnt help w having static meshes inside the area
For anyone interested, here is a free open-source plugin that let's you easily create blueprint task nodes in blueprint and customize their look. If you are familiar with FlowGraph, it's like that but in a blueprint graph 🙂 https://github.com/CommitAndChill/BlueprintTaskForge
Figured it out, i didnt have the cached poses in the animbp. thought i didnt need to use it if i just had defaultslot
For someone who can write task nodes but doesn't necessarily like to. Has this been profiled? As in what is the overhead of this compared to writing one in C++?
It creates a uobject for each task
Pretty sure the C++ ones do that too. Not only per task but per call.
It probably works very similar. I'm not awake enough to look though the code on my phone
Can someone please help with as to why the UI for the product configurator is broken when pressed play? Instead of the default circular UI i get these white plain boxes that dont do anything when clicked (ones supposed to change the cameras and the other the studio wall colors).
Im really out of options here
It might seem like the problem is with the UI and main widget? Did you create the widget in the HUD class, did you set correct HUD class for the map and is the logic in the widget correct (so the buttons do what they are supposed to do)?
I would break this into a very little steps and go trough what should happen in each step then fix it one by one. Start small, like what is the first thing that should happen when you click Play? Is it happening and is it correct? Then go to the next one, until you figure out everything.
I understand and thank you so much! I got into this since im the only one in the office who uses unreal (although just for cinematics) and this is a new venture for me.
Tbh i didn’t set up anything and just used the premade blueprints but I at least know now what can be the root cause, thank you!
I tried following this tutorial but for some reason it does not work.
https://youtu.be/Xzbw1PWGqa4?si=dP-5mtAWG0JcnEF6
Thank you for your inout! Cheers ❤️
Hey everyone!
In today's video you will learn How to create a configurator using the variant manager inside unreal engine 5.
We start off in Blender where I discuss the creative process and the thought process behind setting up and preparing for a configurator. We take a dive into unreal engine where we discover the ins and outs of the variant...
hello, after a week of struggle, Im kinda close to giving up on this because I think its impossible 😅
Imagine FPS hands, which have a socket in each hand. An actor has to spawn and KEEP its location between those sockets at all times without using any tick events (or at least not using for each loops inside tick).
(Think of a fireball, or a levitating rock following exact central location between animated hands at all times)
So far I did
- filtering sockets by prefix -> array (I need this to distinguish between several sets of sockets)
- get location of each of the socket elements -> get average array location
- spawn and attach scene component to that average location and act as an anchor
- spawn the actor on top of the anchors so it can be dynamically attached/detached (shooting), while SC stays where it is until firing mode is switched.
The problem is that the hands are animated and the bones/sockets move all the time, so the average location needs to be updated. This means using tick, but if I use tick Ill have to give the actor either the updated average location or let it calculate by itself, either way Ill need to loop over an array of locations to determine the center at all times. And then add this to a "sway" calculation too, which will tank performance?
When I started programming I really thought there is nothing impossible, but Im getting convinced that the impossible gets only possible with sacrifices by changing the idea to some degree and thats a no no.
I just want to press Q, switch firing mode, create the needed locations/anchors for the actors to spawn, spawn those actors, update those actors locations all the time, press Q, destroy those actors, destroy anchors, get new locations based on other bones, create anchors, spawn new actors.
Which means I need to get average location of N sockets at all times to be able to attach the anchor to it and let actor be attached to the anchor + sway offset. Is it really impossible without doing for each loops inside tick event?
Cant I just use anim bp somehow to get the location between several bones since its already running a state machine every frame?
nothing to do with state machine
what's stopping your anim bp from getting the bone locations?
literary nothing
Get Owner -> Get Mesh -> Get Bone location
Also I don't get the idea of avoiding tick, if something needs to be evaluated every frame then tick is the place.
that I need an average between the bone locations at all times
all times = every frame? tick it is.
I didnt know this exist, there is some more air to try now, thx
I only know one node to get the bone location
which is Socket location but it will also look for bones.
hm okay, so when I have a for each evaluating an array for an average inside tick, and add the sway function and set world location of that actor per tick, this is ok?
yup it does, thats why Im filtering them, but this isnt a problem, I only need to filter to specific sockets once on mode switch and deliver the sorted sockets to the actor, which will run a for each inside tick to get the average of those socket locations.
I actually thought sockets can be considered bones
so Im trying to avoid something unavoidable?
what are you really trying to avoid here?
you are avoiding something that most likely cost a peanut
if you really care about performance then profile it, but if you are not even losign 1 fps, why do you care.
having to redo the entire system again because my fps drops hard with 10-15 actors following player
are you sure it's caused by getting the socket locations?
try to unhook the function and see if the fps stays dropped
Im not sure because it didnt happen yet, but Im afraid it will and I wasted time, so I kinda try to find the most efficient solution
I dont know why Im avoiding tick so much, I guess because everyone is saying not to use it so often everywhere? But if you say its totally fine to do that in this situation, then I will have to bite the bullet.
if something need to be evaluated on tick then use tick
sigh, so much trying and in the end Ill have to do exactly that haha, alright, thanks 🙂
I just want it to be scalable because I dont know how many actors I will want to spawn, I know roughly, but it can be 1 to 5 or up to 15.
~~getting the transform should cost next to nothing
your fps drop most likely from the rendering stuff
okay good to know, I always assume getting anything per frame is expensive, and is close to casting per frame in terms of performance
alright, thanks!
(and btw. yea youre right, I should profile and stresstest things before avoiding it, not just assuming, that was pretty stupid)
But Ill try the anim bp approach, and get info from there first
This answer the most common myth prepetuated on the internet.
from epic staff it self.
including "avoid tick" or "avoid casting"
grabbing coffee
thanks man, Imma inhale this info, cause coding itself is fun, but its not if ideas die because of not being able to proceed due to fear of something
Ari is truly the GOAT, each of his presentations are always a lot of fun while being very educative 😄
Just finished watching the talk, very insightful, thanks Ari for this one.
So I guess I have two choices, either figure out a way to have a bone in the middle, for example with constraints shenanigans in the rig if even possible, but this is not flexible, Id need to have extra bones predefined all over the rig for locations which "could" be used, or really calculate the middle of X predefined bones in tick and call it. Some things seem to have no other way around them 😅 Again thanks for sharing this!
@frosty heron @unique bronze @dreamy marten Unsure if you guys know about it, but Ari also keeps a Notion with some very nice tips and tricks. A few of these when I read it the first time were 🤯
https://flassari.notion.site/UE-Tips-Best-Practices-3ff4c3297b414a66886c969ff741c5ba
Hi! How to change a rich text size from an in-game settings menu?
If you're looking for like a text scale. It might be easier instead to simply make a normal and rich text version of widgets for your project that are wrapped with a scalebox. You can use those everywhere and only those two classes can handle the setting changes.
Interesting, i'm gonna try that
I haven't done text scale, but that's probably how I'd do it. I did similar when I clamped Red Solstice 2 for widescreens. Menus were wrapped in a single widget that clamped the aspect ratio of the box so that canvases couldn't stretch entirely to the left and right of the screen. Not as clean but easier than a whole hud redesign.
Ok ok, my last approach was enabling the override default font and changing the scale from there
Seems like this approach is working
Hey guys! Very new to Unreal and something's got me perplexed. Is there no way to use a BP's variables in an animation? I'd like to interpolate a ProgressBar's percentage based on a variable at the moment the animation is called, but I can only input hard numbers seemingly. If this is intended, is there a way around it?
@maiden wadi TOP IT'S WORKING!!!! I WAS TRYING DOING THIS FOR SO LONG! <3
Happy it worked out. 😄
i wish i could do this, but sadly it doesnt work
and the only way to add the delegate is to drag it inside the func
I need to open editor to test it, but there are some relative options I think.
I'm not understanding 100%, but I think you're looking for the CreateEvent node when dradding off the OnAccept pin?
It lets you reference an event in the same class without having to drag the line to it.
i have a popup widget with OnAccept event dispatcher, so you can bind an event and add logic to when player presses OK
this setup works, but wrapping binding and the event handle into function doesnt work, sadly
wait, it turns out i forgot to plug in the logic
it actually works
if I only have the button in the world, is the wire also loaded? (and vice versa)
trying to fully understand hard/soft refs and interfaces
I mean it doesn't look like it's loaded on the size map, can someone explain the refference viewer?
Hello,
Does anyone know if there is a way I can copy an object to the clipboard from an Asset Action Utility BP?
nvm, I understood lol
Unsure if you can in blueprint. If you have C++... From memory it's as simple as calling FGenericPlatformApplicationMisc::ClipboardCopy.
Or do selects always run both true and false logic before selecting?
It will evaluate all paths.
Yea, that's what I was starting to think. Thanks
Pure node goodness.
Thanks! Do you know, can this only copy TChar * Str, or if I can this with an object will it automatically copy the object as a TChar * Str?
What do you mean when you say UObject specifically? An Instanced object in some class or like the class itself?
so trying to learn gameplay tags and need a little help. I have made my tags in my gameplay tag manager but can't seem to see them in the objects i want to have the tags on. Ive seen a few tutorials that add them as variables but that doesn't quite seem right. Is there a way for me to just be able to see them on all my game objects so i can set them without adding a var to each
i know i can just type it in the class defaults, but i don't want to have to worry about misspelling if i can
The Tags array is an FName type. You will need to make your own variable that holds your tags.
has anyone here used Motion Warping with Mover? I encounter a crash while executing Play Montage (Mover Actor) node.
Interesting thing is that the crash occurs only when the Motion Warping component is present (even though I'm not using any Motion Warping node in the graph)
(Heyo from Ironward. :D) Do you happen to have the crash report or log file from the crash?
i tried using a physics material on an object and no matter how i set the friction it's gliding like on ice ?
(lovely finding you here) yes indeed I do
got a callstac and a log
will also attach a quick debug node setup
I did snoop around in code, but I couldn't really understand what was causing the asserts to go off
When I remove the MotionWarping component, and play the montage, it works... but the point would be to actually use Motion Warping hahaha
1000000 friction is the same as 0.0 ?
Can anyone comment on whats happening here? I keep getting an unknown build error and a bunch of downloaded assets keep giving this error (first pic), but I dont understand what's wrong with the MI_Default_Opaque_DS since i can access it just fine in editor (second pic)
game was building perfectly fine in 5.4 but now in 5.5 it wont
it seems that the only impacted materials are the ones imported from Fab
Ew. Threading crashes. :/ Is this a 100% repro case?
Ill need to check with a clean project OR do this node setup on one of the Mover Example pawn actors... will do that tomorrow
What engine version also? I'm trying to glancing through the code but some of the stuff is different for me on UE5Main
5.6
Well your crash log is technically wrong I think. I'm fairly sure you got a wrong crash report due to the thread ensuring. It looks like this other thread might be running a GetValueOnGameThread for a CVar while you're in another thread. If you can modify engine code it's a fairly easy test in...
UMotionWarpingComponent::ProcessRootMotionPreConvertToWorld
Comment out the first #if at the start of the function and retest.
will follow up on that tomorrow
Anyone know how to fix this error im getting when building? I turned off VT a while ago and in 5.4 it built fine but after migrating to 5.5 it wont build.
this is awesome, thx for sharing!
Made a forum thread to document this build error better. Can anyone take a look? https://forums.unrealengine.com/t/unknown-cook-failure-after-migrating-to-5-5/2608762
I have a build of my game on 5.4.4 that works perfectly fine and builds fine as well. After hearing about 5.5’s fps improvements I made a 5.5 copy. This copy refuses to build always giving an Unknown Cook Failure. I went through the logs and found that almost all of my downloaded items from Fab had errors associated with the materials instance...
are there any resources on sorting structs? I have a custom struct that holds player index and player score (both ints) so when a player wins 3 rounds, it can sort score from high to low so i can move the correct player to the right location for the win podium (think what Olympians stand on when theyve won the Olympics.) I'm seeing things like add the score to an int array and sort that, but then how do i sort the player index so i know which score belongs to the right player?
Don't play carries their own score?
a player state is an ideal place to place the score for each individual player.
especially in the context of multiplayer.
i would have to rewrite it all to work with a brand new player state which i dont know how to do, the score is stored within the player blueprint, but im using 1 blueprint that is instanced so there can be up to 4 local players using the same player bp just different materials.
you will need to establish relationship between the data and the owner of the data.
can use a TMap where the player controller is the key and value is the score.
as for sorting, for intro level you can look at bubble sort.
oh wait, if the index matter then don't use Map, use struct and array instead.
right ill take a look into bubble sorting. thank you
Data structures and algorithms bubble sort tutorial example explained
#bubble #sort #algorithm
// bubble sort = pairs of adjacent elements are compared, and the elements
// swapped if they are not in order.
// Quadratic time O(n^2)
// small data set = okay-ish
// large data set = BAD (plz don't)
mus...
i was checking that one out but i dont know c++
you can do this in blueprint
it's only doing a for loop, storing temporary value and swapping based on condition
Hiya. Which is more optimal? A data asset or having the same struct inside a BP as a variable? The context of this would be for a building generator, so most likely would end up with a lot of data assets loaded in memory
BP structs are always copies (they don't support pointers like in C++) so using a data asset would be more optimal if it's going to be the same set of data.
And in the case of different data? Would a BP variable be more optimal compared to a large number of data assets?
Sorry it took a while, ended up having to take a break because it was really annoying me. I'm not a coder by trade and I've not been sleeping well for a while because of it (everything to do with this game has landed on me pretty much, not to trauma dump though)
I ended up following a video by "Ask a Dev" somehow managing to rework it to fit with my struct and everything seems to be working correctly, so thank you for pointing me in the right direction. Other issues have come up but thats more to do with player stuff but I should be able to fix that shortly
Does the character component trace the ground automatically? Since it knows that it landed
yes
How can I access this?
Access what? The hit result?
Yes, I want to get the physical material from the material hit
The hit result isn't stored but there is a function called 'FindFloor' that's used to determine if the character is on the ground.
Why all tutorials do a sphere trace by channel? Do they not know about the FindFloor function?
Probably not.
Some tutorials are straight up misinfo youtube needs to apply the same measures as someone spewing conspiracy theories
It can depend on how old the tutorials are. There's stuff that wasn't always exposed to BP.
I spend more time looking at the source than I used too so it's easier for me to see what's actually exposed to BP and peek at what it does and how its used. (its how I found the 'FindFloor' function)
Hi all!
I hope this is a beginner's question. Is there a simple or best way to destroy a Blueprint Actor from the Player Pawn using an Input?
I have created a Blueprint Actor that is a 3D Widget where it's tracking the Player Pawn position. I want to Destroy Actor from an Input (in my case, it would be the X button since I am using this for a VR project); however, I am struggling referencing the Blueprint Actor inside the Player Pawn.
Can anyone explain or show how to solve this?
What are you wanting to destroy and why? With things like this, context can change how you might want to handle it.
Okay.
I want to destroy the Blueprint Actor that is holding a Widget that is used for the 3D World space. The actor is called BP_UMG_Prompts. Right now, it spawns on Event BeginPlayer (for testing purposes) inside Player Pawn's Camera -> Spring Arm -> Scene Component called UMG, which I am using as the reference point to where it spawns and tracks. The reason why I want to destroy it because the user will have the option to close off the one-time pop up message they are reading.
Any idea what WorldContext would work for PrintString inside a BP function lib that would show up in the log?
You would need something like OnClicked event interface and then from PlayerPawn/PlayerController InputAction_Click/Select (X) which would fire line trace, get the thing 'clicked on' and call that interface OnClicked which would do xyz.
Yea - not the best approach overall to what you wanna do - but that wasn't your question. Now, in order to ref anything anywhere (in general), abuse the actors that are "always" available: GameInstance, GameMode, PlayerController etc.
In your situation, since you do have a PlayerPawn setup in your GameMode, the option to "GetPlayerPawn" is also available - so let's reverse the logic a little:
- Inside your PlayerPawn, Create a function or event - something like "FetchREF_UMGPrompts". Whatever. It should have an input pin of type (TheActorYouWantToReference) - in your case, BP_UMG_Prompts.
- When BP_UMG_Prompts spawns/OnBeginplay: GetPlayerPawn->CastTo(whatever class your player pawn actually is)->Call the FetchREF_UMGPrompts that now has an input. Hookup "self" to that input.
- If you now go back to your PlayerPawn, you can just promote that input (which will be an output on this side) to a variable. Voila: reference to anything you want lol.
Think of it as "self-reporting" as in: any actor can "report" their existance at any time to any of the classes that are widely available, directly.
Is it a good-practice? Nope, Does it work? Every time!
But also if you have WidgetComponent on Actor, on BeginPlay you could 1) Create Widget and set as WidgetComponent 2) Set Reference to that Actor inside widget. 3) When you click on the button/something of the widget, it calls to destroy that actor.
I have created a plane with a material on it, can't I place it on the content browser like in unity?
Hi again!
Is there a faster way to change colour or check each text on what objective has been completed through an array instead of having to repeat for each branch and boolean steps?
Or, in fact, are there any tutorials online that talk about creating an objective task system? All I see are quest systems, but nothing that is like traditional objectives like: Go To Location, Interact at Location, Interact 0/4 Interactions, etc.
maybe an array of bools
index 0 is the first, and so on, then you can use the index to set it and get it
I was thinking about the array part.
I just need to figure it out how to do the setup. 🤣
this just cleans up all the bools imo
and you can get(taskIndex)
and it will tell you if it's completed
and set(taskIndex,true/false)
this way you can have a resuable function
Would Set Array Elem be the one I am looking for?
so i'm guessing you never used an array before ?
it is one that you would use yes, but first you want to create an array of booleans and set them to false for not completed
this will replace, hascompletedX, with an array
I have used it to check a list of objects (which was 19) to turn on their visibility, but my understanding of how to effectively use it, no.
do you have a bunch of booleans, completedone, completedtwo, etc ??
Yeah... 😅
right this is what you can replace with an array, so you don't have to keep making and using booleans
so arrays have indexes, do you know about that ?
Yes, indexes start from 0 to above instead of 1. And if I recall, changing the value of the index will switch which is on the list that gets called.
right so an array is a list of items
in this case you want a list of booleans
and the first one is 0
and so one
you can' get/set based on index
so objectNumber - 1
is your index
so that 1 is zero
and then you can get/set based on that
instead of all these seperate variables
Hmm. I see.
where ObjectiveNumber, is 1 to whatever
just make sure you have it in the array
so you wouldn't want object 14 if your array holds ten items
you can error check this
You could also create map of Actor(Objective) and Boolean.
Each Objective would add itself to the Map (in manager/singleton) then each objective would call to that TMap on completed and set true.. everytime it sets true in one, you can if all of them are completed, if yes, then game win for example.
Ah, like that. Yeah, I was just researching and looking at what the setup would look like since I am trying to understand it. I really appreciate this explanation, though.
yes this is way easier to manage
F
Another option is to use a gameplay tag container. You can then have a tag for each objective and add it to the container when complete.
You can just check if the container has the specified tag.
@rocky spruceI think you really need to look into structs and how they work for the kind of thing you're doing, otherwise thigs will get nasty quick and you won't understand what's going on...
an array of structs would be nice
becuase then you would have all the information you need for each objective
@rocky spruce Start here:
https://www.youtube.com/watch?v=2-tCCtkX1sk
Don't worry it's UE4 not 5, there IS no better person to explain basic things in unreal. Keep the channel as reference 😉
Structs and maps are your friend!
Objective should be generic. It should be able to evaluate and track its own "objective".
E.g an object to grab 4 items, etc. Would use UObject for this and gameplay tag to uniquely indentify the objective.
Oh, I know. I am not THAT new. It's just that a lot of my blueprint work in the projects I do is done fast due to many of my projects being prototypes and short deadlines. This is stuff I will have to learn in my spare time (that if I do get any but yeah there is just a lot to learn and practice and I know there are many different ways to do certain things).
I just never worked on an objective or task system before besides the very basic ones where you mostly fake the logic through visual elements.
tbh i get actor of class on tick, untill it works
Oh, so you're in a rush... Well, rushing quite like that (like you did with those bools) only ends one way in my experience - in a total mess + more time invested into it.
If you are working on a system theres no reason to do this.
Especially for a quest system
Make an actor that manage the objective
oh i know, i'm just saying sometimes i just leave stuff one way
you don't always need to optimize and make it perfect
especially just testing stuff out
and learning
wtf?! Why am I not getting your kind of projects guys? I only work on structured shit where every pixel matters... somehow...
i like the array of structs idea tbh, but they are still learning arrays even
UI - yea, every damned pixel has to be perfect/spot on...
Hey all! I'm trying to create a BP hierarchy for weapons, but some may have skeletal meshes and others may have static meshes. I want to enable physics on the mesh, but my unerstanding is that I can't do this without making the mesh the root - which is tough given the different mesh types. Is there a way to do this without creating BP child classes for both static and skeletal meshes?
why don't my physical materials apply any friction ?
idk, everything I do that doesn't require an actual object because it needs functionality, I just slap Maps+structs on. 🤷♂️
Keeps things clean, I spend 1 day setting up 139578019570 helper functions and then it's basically lego lol.
ya BFL are nice
Oh, and it's lego foreverrrr - only minor refactors might be needed unless whole systems come to interact with older ones
Afaik enabling physich detach the component from the actor anyway.
Stimulating physics on a component that isn't the root makes it simulate inside itself. This means getting the actor location wouldn't be what you want if you want to know it's location. Rotating it can be interesting as the physics part will keep its relative location. 😅
how can I edit the camera shake based on the player's Z velocity?
just wondering does anyone have a decent way of delaying player spawning until I want them to rather then when the predesigned method decides them to be ?
Game Mode has overrides for spawning default pawn and starting the game in general..
which ones would I override out of interest cause I don't mind game mode spawning the player just rather I decide at what point that happens
I can see there HandleNewPlayer function I can override however I won't know the duration needed so would rather call to my game mode to spawn player when I'm ready for them to be
Sec. Need to glance through it.
ah yeah that makes sense
however this example makes more sense, coz ur clamping the velocity which makes no sense since the Z velocity can be even over -2000 when free falling
(edit): I forgot the abs
so it seems just nulling out the default pawn class to none would do same as what I want to achieve
@narrow sentinel There's a boolean in GameMode named StartPlayerAsSpectators. Check that as true. It'll keep them from calling RestartPlayer. Then you can later call RestartPlayer for that player whenever ready.
Not quite. Cause then you have to manually spawn the pawn. If you use the built in systems you just have to call RestartPlayer when you're ready.
yeah I've done the latter
no question is I'm pretty sure player controller is created regardless of what happens with the pawn so that should be fine
I mean you can manually spawn the pawn if you want to do that. It's entirely up to you. Just that the systems are already in place, so no need to remake them. 😄
Any of you fellas have any experience with Editor Utility Blueprints?
so got some odd stuff here, I am using this to load into the main level to then load my stream levels but when I call that for some reason the level opens but within the same level as what I load into at PIE
Does making it Absolute change that?
doesn't appear so
bassically you can see I'm still in the MainMenuMap but it's opened the main level within the Main Menu map rather then loading player into the Main level map
wait
arggg how is this so difficult
It shouldn't be. 🤔 I don't recall having issues with that before I started using Common Session Subsystem for opening levels.
main menu
i click new game and the main gameplay level loads but unless i'm missing something it's done it into the main menu map
shouldn't top left it change to show the current level loaded and top right shouldn't it show the persistent with the streaming level that are loaded ??
I'm making a bubble shooter and I need a bit of help when it comes to determining if an actor is currently snapped to one of the grid values of the float array.
Just to report on this, I COULD NOT repro the crash on a clean project unfortunatelly
As I'm just doing some prototyping of mechanics (which is not connected to movement) I'll just go without certain animated movements.
But later it will be prolly necessary to rebuild the character with a new base with Chaos Mover (as physics interactions are extremely important)
I would probably report it to a programmer if you're not one, if you need. Whoever can maybe notify Epic with a PR or bug report. Regardless of how you caused it, whatever is threading that should definitely not be calling a function that has a GetValueOnGameThread. At the very least if it's safe to thread that function they should have used GetValueOnAnyThread so it doesn't ensure.
Ah. Maybe not. Playing in PIE gets convoluted with play in viewports. Chances are your code is working fine, just the editor isn't catching up entirely?
arr fairs
What are you needing help with? I've dabbled with them a little.
so i'm cooking my game and is this normal is seems to going through at lot of this and just wondering if theres something I've done wrong somewhere for this issue to be caused
I'm the only one on this prototype, so currently its up to me to dig this out
one thing that is certain is that I'm doing SOMETHING different with my custom pawn than those in the Mover Examples... but it's kinda tough to follow this code as I'm not versed in c++
Yeah. :/ I haven't touched Mover yet. But I can definitely say it's an engine bug if you're not a programmer. I can't look atm, but from memory I'm pretty sure that if you package your prototype for shipping it'll run but I don't know if it'll work correctly. It at least won't ensure crash here anymore.
Cause this is your issue here from what I can tell. If it's not a Test or Shipping version. Like when you're cooked for Debug, or playing in Editor. It'll call this GetValueOnGameThread. And that internally has a check.
// faster than GetValueOnAnyThread()
T GetValueOnGameThread() const
{
UE::AccessDetection::ReportAccess(UE::AccessDetection::EType::CVar);
// compiled out in shipping for performance (we can change in development later), if this get triggered you need to call GetValueOnRenderThread() or GetValueOnAnyThread(), the last one is a bit slower
cvarCheckCode(ensure(GetShadowIndex() == 0)); // ensure to not block content creators, #if to optimize in shipping
return ShadowedValue[0];
}```
Tried to find something more in Debug mode... not much luck. Encountered a disassembly kind of action haha
Does anyone know, what are the steps to creating a HUD everyone sees in Multiplayer? For instance, like Super Smash Bros how everyone's HP and percentages are on the bottom of the screen. In online mode, is the HUD ran on the server or does each client have it's own HUD like in the player controller and then updates HP through the UI widget? I'm trying to wrap my head around having each of the 4 player's HP stats and scores update so everyone can see it.
anyone know how to solve this ??
LogPackageName: Warning: GetLocalFullPath called on FPackagePath ../../../../UE_Projects/Projects/EchoContainment_Protoype/EchoContainment_Workspace/EchoContainment_Project/Content/ProSoundCollection_v1_3_MONO/Footsteps/Wavs/footstep_wood_walk_10 which has an unspecified header extension, and the path does not exist on disk. Assuming EPackageExtension::Asset.
LoadErrors: Warning: While trying to load package /Game/Core/Dynamic/Blueprints/Audio/MetaSounds/Footsteps/AIFootSteps/MSP_Wood, a dependent package /Game/ProSoundCollection_v1_3_MONO/Footsteps/Wavs/footstep_wood_walk_10 was not available. Additional explanatory information follows:```
nevermind found it
Regardless of whether you're in singleplayer, multiplayer(local with multiple players on the same machine), or multiplayer online, or even a mix of local and online. Your UI is local to the machine.
Each machine has an AHUD actor. You can see it specified similar to the PlayerController in the GameMode class. You can kind of use this as a manager for each player's UI since one of these will exist per player on the machine where the player is playing.
For example a Playercontroller, up to two can exist per player. One on the server machine, one on the machine they're playing on. One will exist if that player is host since that is both their machine and the server.
But for HUD, if the player is not host, no server side HUD will be created for them as it's local only.
But this is a moot point because mostly each machine just needs to put up one primary widget that has some subwidgets in it. For example you can have a hierarchy like the following.
PrimaryDisplay
PlayerStatsContainer
PlayerStats
PlayerStats
PlayerStats
PlayerStats
Where PlayerStatsContainer will look at the GameState's PlayerArray and dynamically create and add a PlayerStats widget to itself for each player in the array.
Each PlayerStats can handle itself by getting a PlayerState passed to it. You can get anything you need from the PlayerState because it has access to get the Pawn associated to it. So regardless if the health is on the PlayerState or the Pawn(should be on the Pawn), this widget can access it through the PlayerState it's given.
I think I sort of understand. Right now I am testing with just 2 players playing as a Listening Server in the play mode. I dunno why some of this just seems broken. Any other sources that have a breakdown on this method?
I don't know any that are solid. There's a lot of content on how to set up UI for games based on multiplayer, but from memory a lot of it is convoluted and some have bad information. It's kind of just a trial and error thing unless you have access to a decent project to learn from.
That's what I'm noticing, a lot of mixed methods. I appreciate your response!
One thing I can say, is that you should avoid making gameplay update UI for the most part. Like in my example above. One widget is added to screen that has that container in it and that container widget itself has the code in it to update from the GameState's PlayerArray. And then the second widget for each player is just passed a PlayerState from the PlayerArray when it's created for each player. And that widget handles polling or binding callbacks to update when health changes. There is 100% nothing from the pawn or gameplay code telling that UI to update.
I haven't even touched GameState, or really created player array except for adding player controllers to the gamemode bp. I have a character BP and am using child actors with different materials to identify as different characters. In the gamemode bp, I'm then finding all the player start classes on the map, getting their transforms and from them deciding which character will spawn.
now I'm just having trouble figuring out how to connect each of those players to their respectful place and correct HP bar on the HUD.
You don't need to create it. The GameState already maintains an array of PlayerStates for the connected players.
ok, I always wondered about that 😬
Anyone why my dynamically filled Scroll Box overflows like that?
Try setting it to Fill instead of Auto.
In it's slot settings.
That changed nothing
I'm not trying to make it fit my UI tbc, I'm trying for it to crop the list as its supposed to, you can see the end of the list on the Lantern recipe
Can you show the widget hierarchy where the scrollbox is?
Ah. it's in a canvas. It seems like it's trying to work correctly. 🤔 I wonder if it'll work if you change the Clipping settings on the scrollbox?
Ah, there we go. For some reason, Replace With (or the Canvas?) made it default to Inherit
Cheers
🥳
Does anyone have experience with quadruped characters? Specifically, how if they are stationary they can turn in place but if they are moving they have to have a turning radius.
Reposting this issue because I still can't figure it out. Anyone with knowledge of building PLEASE help me out 😭
https://forums.unrealengine.com/t/unknown-cook-failure-after-migrating-to-5-5/2608762
I have a build of my game on 5.4.4 that works perfectly fine and builds fine as well. After hearing about 5.5’s fps improvements I made a 5.5 copy. This copy refuses to build always giving an Unknown Cook Failure. I went through the logs and found that almost all of my downloaded items from Fab had errors associated with the materials instance...
Did you enable virtual texture support in your project settings?
Do I have to? My game in 5.4 didnt have VT support and built fine so why wouldn't this one?
I found disabling VT helped my performance, and I generally had a bunch of problems with VT's in general
Well, either that or you need to remove virtual texturing from all textures. Whatever these VirtualTexture0_3_HQ things are.
It's telling your that you're trying to cook a texture set up to use VT without having VT enabled.
Yeah I realized that. I went through and reloaded, then revalidated each and every texture. I figured that would've gotten rid of the VirtualTexture0 things but I can't for the life of me figure out where it's coming from. The log doesn't have any path for the VT0 things and searching the project has yet to yield anything. Guess ill keep searching for it :/
hey all
Im trying to make a sticky cover
basically
we have 3 arrows making line traces
out of the two outer ones, if one of them does not trace I want to make the character move out of cover if they hold a or d (left or right) for the right amount of time BUT only from when these go false
any ideas?
after that I need to figure out how to make the character aim close to the ledge of the cover when in crouch mode
anyone has any ideas about this one?
the map is from importing a thirdperson map to a new project and i used open command on it which works but this error causes issues
If you have root motion animations, you can offload positioning to the animation. Otherwise, you'll have to calculate your own paths. For example, you can set up bezier curves whose shapes change based on velocity, turning angle and character size.
since BP enums are cursed, is there a replacement i can use?
Declare them in cpp and expose to blueprint
The same goes with struct
You should also make native class
native class for what?
To work in cpp land
was trying to quickly make a project for a game jam, was wondering if i could just quickly get it done all in BP
Sure, why not
Still a fact that bp struct and enum is cursed
If you dont mind working with broken tool then just setup version control system
And hope they dont break silently for the duration of the game jam.
i think i'll just take the couple of extra minutes it takes to make the required C++ classes
good to know to avoid bp structs and enums going forward
guys is someone experienced with vrts?
I want a quick fix on my project if someone is available to hop on a call for 5-10 mins
Is there a more precise way to move ai when first spawned? I'm calling Move To on Event Possessed but I'm having to add a delay before it will work
Any idea why the "object" blueprint class is missing important nodes like "getGameInstance" or "loadLevel"? I thought I could create blueprints managers classes that way, but missing such nodes make them unusable... Am I doomed to put the whole game logic inside GameInstance?
cuz they might not exist in a world
Hi everyone, I have a question about using functions inside actors and their impact on performance.
I have several actors with functions that are only called when a "BP Physics Manager" triggers them on a timer event. The manager decides which actors to call based on an actor variable. Specifically, if an actor’s variable equals X, the actor is added to an array inside the manager, and the manager calls that actor’s function periodically.
My question is: for the actors that have this function but whose variable is not X (so they never get added to the manager’s array and their function never gets called), does having these unused functions affect performance at all?
I know I could create child Blueprints to isolate the code, but due to my setup, that’s not feasible. Thanks in advance!
Im talking in a large scale of course, thousands of actors in the scene with this setup.
That's the thing, I don't need them to "physically" exists, like the GameInstance doesn't exists in the world but is still accessible everywhere
gameinstance exist as long as the game is running
so it's always there
are you trying to make something that's similar to gameinstance?(can be get anywhere and can call functions inside them)
In blueprint your best bet is to derive from AInfo and have an actor type without a strong world presence- like WorldSettings or GameMode
true
If you’re willing to write just a bit of C++ you can implement a custom Object type that implements GetWorld and uses the first world context
Yes I guess, it's supposed to be the component handling the communication with my server (not UE), so emitting messages, receiving them and react accordingly
It’s that missing GetWorld override in your Object class that is throwing that stuff off
or you can create a child of blueprint bt task
they're basically objects and has getworld override
then you can construct them in your game instance during init and promote them to variables
and you can make a function library to get the variable from your gameinstance
You nailed it, switching from the parent type "Object" to "BT Task" magically made the nodes appears without anything to change! Thank you!
you're welcome
That's because it actually takes an extra tick for the possession to complete and update the relevant vars. Delaying until the next tick should be all you need.
It's because uobjects don't have world context by default. The nodes you speak of require world context meaning they won't show up.
Just be aware that the tick events in the BT Task most likely won't actually function unless used with a behavior tree.
Okay! Thankfully I don't need the tick events there, it's only function driven
If you ever decide to do a little C++, its only about 12 lines if you wanted to add world context to a UObject.
Yeah I don't have anything setup to do C++, and as a web dev I want to stay as far away from this language as possible...
But I just realized that my project won't package because it doesn't bring along my project plugins folder with a single C++ plugin inside so I might have to do some installation or something...
~~Hi there! I just want to confirm my assumption here:
- After Then0, if the first branch hits false the sequence node will execute Then1
- If the 2nd Branch hits false and hits return, the sequence node will never fire Then1 because the function ceased execution.
Is this correct?~~
I feel very silly, i could just check it with breakpoints 🤣 yes it works as described
Hi! do you know how I can make animated billboard like this? https://www.youtube.com/watch?v=ta1JT_KoP9Q 00:23
Ein Test zu Materials, alle Movies wurden in Frames (pics) geschnitten und via Flipbook angesteuert und wiedergegeben. Dazu kommt noch ein leichter glitch-effekt am.
Weitere Test zur Leveldesign Top Down im Bereich Cyberpunk / Future.
Hi, I have a question about the Chaos Modular Vehicle Plugin and its examples. The examples vehicles send player input to the Vehicle Sim Component using named input axes. I'm wondering where I can see what input axes exist in the Vehicle Sim Component and if there is one for lateral movement?
Any approach recomandations for a loot system, for example I have a struct for base item which includes item slot enum: head, main hand, off hand, body etc, but then I have different types for the main hand: sword, dagger, mace, cashier's check, mug, etc. How can I randomize the drop considering the initial item slot enum has sub enums for each. Use switch on each enum and branch the tree of life out of it?
It does not create extra performance draw to have an uncalled function in a class. The function exists in the class, not the instance. And instance is just a collection of state basically that runs functions on the class with it's own state. So the extra uncalled function does not cause anything extra if you have one instance or a million.
i apologize if this is a dumb question, but is there a way to detect if a pawn LEAVES the vision cone of pawnsensing
From memory I don't think so. You might check out the AI perception stuff though because it replaced pawnsense stuff a while back. Pawnsense is only left in for backwards support.
oh ok
does ai perception have a not sensing mode?
i can easily swap them out since i use btt's
but im not well versed in perception
I don't recall. I've only very vaguely tested it and that was years ago. The only AI I've extensively worked on to date has been a bot player in an RTS which is a very different style. I haven't done much of like persona AI.
well, thanks anyway pardner
Ok no need I realized not even mgs does this
Hello, just something that I'm moving from the C++ thread, where I was asking about how BPs load dependencies based on hard and soft object references. I don't know whether I should quote them, but someone was explaining to me how soft object references still cause the referenced class to be loaded as a dependency. They said
"people recommend making a MySmallerBP which has all the functionality of a MyLargeBP, but you stuff all the assets and weird casts into MyLargeBP— then you can use a Soft MySmallerBP Object Reference variable— which can hold MyLargeBP! - and it’s not as bad to load MySmallerBP"
In this explanation, Is MySmallerBP a base class with all relevant (empty?) functions, and MyLargeBP a derived class with those functions overridden and filled out? Is there a longer discussion of this somewhere?
This is a really convoluted topic because it comes down to necessity and game structure. And SoftRefs are only a small part of the puzzle. You also need to understand the asset manager to be able to have decent primary asset handling. As a case, some stuff needs to always be loaded, data the game relies on to play. But each part of the game may not always require the same things.
Lets take a basic example of a tower defense game. You have two areas, lush green forest place with FactionA and volcano fire place with FactionB. You face completely different units from these factions. These factions use the same ASomeBasePawn class for their units. You don't want to keep FactionA loaded when you move into a match with FactionB.
Because of this, each faction has it's own data asset, and each unit in the faction has their own data asset. You can keep these assets alive and loaded at all times, but you'll only want to load the softrefs in these assets with bundling when you're moving to a match with said faction and release them after you've left the match with that faction.
So now we have two data assets. FactionData. And UnitData. We have a base class for units, ASomeBasePawn. And for instances lets say we have ForestPeople, LavaPeople for factions, Archer and StickWeilder for forest units and RockHands and LavaFlinger for lava units. Each of these units has both a UnitData data asset and a ASomeBasePawn gameplay class.
Inside of FactionData is a hard referenced array of UnitDatas. Inside of UnitData is a soft reference to it's gameplay class of the type ASomeBasePawn. Could even be Actor, doesn't matter, it's a core code only class.
We start a match against forest people. Before we open level we go ahead and tell the game to load bundles for all of ForestPeople's UnitData assets for gameplay. This loads our softrefs into memory and holds them for the gameplay classes of Archer and Stickweilder. This means they'll be able to be resolved instantly and not need async loaded in gameplay, which is good because we need them instantly to spawn waves and not make gameplay wait or hitch.
We finish that match and go back to the map selection where we then tell to unload the gameplay bundles for all UnitDatas. This unhardrefs those two classes and lets them get collected. We start a match with Lava people, and the same thing happens as above except now RockHands and LavaFlinger are loaded before gameplay so we have instant access to them once we're in the gameplay map.
There are other cases where you won't use bundling. UI textures is a good one, you can leave these non bundled and just lazy load them as needed in UI. But they'll still go in the associated Faction or UnitData data assets.
It worked! It actually worked! Thx man
Does anybody know how to parse each line of a Multi Line Editable Text Box?
using Parse Into Array with \n or \r\n as the delimiter doesn't seem to work
Are you specfically doing this in BP or C++?
Shouldn't need the /n. Just a shift enter. Let me confirm though.
Yeah, just made sure. 😄 Happy it worked.
so when ever i pick up a item after previously dropping it, it will keep getting farther awayy from me when i pick it up, and im not sure why....
i think its somewhere around here but i don't know what i should reset
Hello!
GetText is a function I had to make in my wrapper UMG widget. All it does is access the Text field on an EditBox that it has
BUT, its not just a "getter" I guess... so something has to actually call it. But its result is used in that AND calculation.
What do you do here? Do I have to create a variable and storre TextIsEmpty in it, set it before calling SetIsEnabled, and then use the variable?
Or can I just connect GetText before `SetIsEnabled and its return will get evaluated when the AND pin is needed?
The "Get Text" function will not "fire" until you plug it into the flow between the "Update continue button" and "Set is enabled"
yeah.. that wasn't really my question but I don't think I explained it well enough.
I figured it out though. Thanks!
Yep. You're screenshot with errors is a mismatch to the question lol.
Solution1
Solution2:
Ohhh!! that's super useful, thanks for that
Marking a function as Pure in its details makes it a "Getter"
Id also mark this function as const
okay, cool. I'm realizing though this whole thing is insufficient because I would need to check every time the edit box changes.
So I think what I actually need to do is expose the whole edit box so that I can bind to the text changed event
Marking a function as const is signifying that this function CANNOT EVER change any variables or propertys, its purly a getter.
So calling it is safe, you know it will not change anything
only get information.
got it
If you (or some other dev on the project later) decided they wanted to edit the function later on to change something, the editor would now throw compiler errors.
Also if you are programing inside of a const funciton, you can only call other const functions, because if some other function wasnt marked as const, it might not be safe to call in a const context.
For example, you cannot call SetText from withinn a const function. Since set text isnt marked as const (it changes values, its not purely a getter)
nice! so it follows C++ rules, that's really cool
Do you know how I can expose that EditTextBox? Or do I actually have to bind to it and forward the event through another custom delegate?
Its a "golden rule" of programing to follow "Const correctness" when making functions.
iirc EditTextBox is public, you don't need to expose it.
Im assuming thats a widget you marked as a variable.
Those are public by default to my memory
Well its inside a wrapper for an edit box from some UI toolkit.
I have another widget outside of that which has a w_input_simple_template
and it needs to know when the EditTextBox inside of that gets a text changed event
So w_input_simple_template can easily bind to EditTextBox, but my widget which has a w_input_simple_template, and cares about when its edit box changes, cannot
You can just broadcast an event when the EditTextBox is changed in w_input_simple_template.
w/e widget that hold w_input_simple_template can grab a reference to w_input_simple_template and bind to the event.
okay. Yeah that's what I was gonna do, was just hoping there was a less dumb way to do that
but if that's standard then I'm fine with it 🙂
Having a delegate in W_Input_Simple_Template is the correct way. And having it broadcast when it's internal widget updates is correct. It feels less dumb when you have an overview of why it's like that.
Things using this have an understanding that it gives input in some way. They should not need to care whether this input widget is using a multiline textbox. normal textbox, or some entirely custom widget. The reasons being primarily encapsulation.
If you use this widget in 200 places in a project, and suddenly you're going to go release on a new platform and you need to swap out the entry text boxes in the project, you don't want to edit this in 200 places. You want to open up this one widget, replace it's widget, hook up the new one to the delegate already being broadcast and be done.
Following encapsulation like this will help you edit your code in a lot of places with much more ease than having to remember what classes are digging their fingers into what other classes. It's not just a widget issue. Actors and components share a similar thing where components do things and have delegates and broadcast them and the actors just listen. The most common being things like the overlap events from primitive components.
Thanks for that explanation, that actually makes a lot of sense now
Ermm.. anyone know why IsNumeric returns false even though the source string that's fed into it is 2
@maiden wadi sorry for the tag,
If I want elements that gets offseted as they are popped in and out in undetermine order, should I not use vertical box?
How do you mean popped in and out?
like item can be selected and the selected element will get pushed out and the rest of the element will need to adjust it's position.
it returns true for me.
Hmm. Playing that out in my head about how I'd do that and initially it would work with a VBox. Lot of mixed thoughts. Going to try to set up a test.
😅 appreciate it, but i feel bad for taking your time.