#blueprint
1 messages · Page 191 of 1
As far as I can tell the physics actor behaves no differently than if I weren't applying an impulse at all
you want physics objects to bounce back where they came from but half the speed?
I want to reduce the speed at which the object rebounds from my character (regardless of it's direction of travel, but generally the direction of travel should be a mirror of the direction of impact iirc)
and nothing affects the bounce atm?
Correct, nothing I've tried so far seems to have worked
Guys i have problem I want add ocean to my map it looks like this but after i add ocean this happens it gets totally flat Ihave no idea why
what you trying to add impulse to? character?
To the actor that hit my character 🙂
is it a character?
Nah, it's a physics body
or just mesh with phys enabled
it looks like it should work then.. are you sure your applying phyics to that phys object?
are the casts correct, etc
I have the mesh saved as a variable, and I'm able to act upon that in other parts of my blueprint, but I'll briefly check it's definitely adding an impulse to the mesh by applying an arbitrary impulse
It's definitely applying the impulse to the correct actor 😒
Think I've got something working, thanks for the help @dapper forge 🙂
My widget construct isn't firing properly because its firing in a loading screen instead of firing when my character and the map loads
Any idea what to do?
I was watching a video on how to wall slide (so you go down slower) but when i am for example sliding and the wall is to my left when i press A (the side of the wall) I slow down, which is what is suppost to happen, but when i press D i am still stuck on the wall and i can not move of the wall. Anybody who has some time to help me?
Hello, I never had issues with UI navigation with keyboard, but right know in one of my menus i can go only right > do we have an ui expert here?
why does this not turn my character around? (2d)
so I was making inventory system and I want to hide the slots that are outside the wrap box or on the border so I needed some advice how do I do this any help as there are not nodes such as get position or get size in the wrap box slot
I think you need to use the set control rotation over here maybe that help
just visually hide them? set clipping in the parent, and set it to a specific size? just an idea
or if you know 11 slots is always gonna be the max, just check for child count
Is that a bug?
Just visually hide them
yeah setting visibility on some factors you may know or set yourself might be the best idea?
or use sizebox and clipping as i said could work
there might be better ways tho!
THX! It worked, have a good day!
one last question does the wrap box changes the size of the content or does it keep it same
Can I not get all the values from one speciffic key from a map? There is only a node to get all values without specifying the key.
Hey guys so trying to set a system and wondering the best way to do this would be. I have target actors all over the map and will be lets say 10x targets when you shoot one it will go to 9 and update the widget. Is getting all actors of class and then putting that in the widget the best way after each target is destoryed?
Map keys must be unique, so you just use a get node
How to hide one button from my hud(widget) when my character interact with a collision box in the level
How can be this done? The overlay with fertility
Thanks Clipping it worked
You need a ref to the widget. So wherever you Created the Widget, promote that to a var. then talk to that bp on overlap/hit and get that ref, then you can turn off that specific button’s visibility
What is the most optimized way to change material parameters each frame? Timeline?
Each frame? Tick
I'm struggling to make a character mesh rotate around based on the angle of the surface it's standing, to simulate a tilt without affecting the actual physics of the CMC.
The current issues is that it samples the angle from the center of the character, so if the player walks slightly away from a ledge, but still standing on it, it samples from the surface below it.
how do i play the animation i just made?
Not to mention, it currently snaps to the surface instantly without interpolation, which I need to add yet
UE Bug 35937 Anyone know what this bug is and if theres anything I can do to have it not occur ?
it references sharedmaterials of something
Hey guys
New to unreal, need help with animations.
How do I wait until an animation is finished in blueprints?
Depends
Do you know how long the animation takes? what is the animation in this context?
Does anyone have an idea as to why this is happening?
Basically every time I restart UE5 I have to clear the map variable and reset all values for it because some how they become invalid
I want to trigger ragdoll behaviour once a death animation is finished. I know how to play the animation and how to ragdoll but I don't know how to wait for the animation to end in blueprints and I don't really wanna use explicit waiting.
Simple, just make the animation a montage and executee whatever function starts the ragdoll once the montage ends
People have been talking about Anim Notifies but I couldn't reference those from blueprints.
In this case you don't even need a notify, just a montage of the death animation
My animation is already a montage and the ragdoll behaviour does not wait for the animation to end so it basically looks like it only ragdolls.
On the Play Montage node, just conntect the Ragdoll animation on the On Completed socket.
hello need help?
This will execute the ragdoll as soon as the last frame is finished playing
This works, but my character shoots back up when ragdolling. . .?
Can you show me the nodes?
"play animation" node
Alright, so what's the current behaviour
this
The file you sent did not embed
It's a video file recorded in OBS Studio
the character basically reverts back to standing position after completing the death animation.
and then ragdolls.
Next time send a file that would embed on discord, most people won't go as far as to download short videos for this
I'm not sure how to do that, but I'll look it up.
Anyhow, the problem here
The ragdoll happens but the montage ends and returns to the player default idle pose, thus launching the character
Try to end it with Set Animation Mode to anything else
I connected to blend out output pin
It gives you the behaviour you want?
It's almost the behaviour I want
But not there yet.
When it ragdolls it doesn't happen smoothly.
I'm thinking I should use anim notfies for this?
How do I reference the anim notif after creating it in the animation?
Usually I would do this via an interface
Call the ragdoll from the notify BP
How do I go into the notify BP?
When I create notifs they jsut appear as text on the animation timeline.
So I’ve been trying to wrap my head around Data Assets, components and datatables. I’ve noticed that data assets allow easier data manipulation and calling without having to worry about casting.
I’ve been attaching structures to components for my space system as variables, and It works similarly to what I want to do? I guess my main question is.. is it easy to edit and call information inside data tables and/or components? What are the limitations to datatables and components.
Are data assets any more efficient or less efficient? Does it really matter? I’m getting tons of unclear messages from tutorials.
Thanks!
im pretty sure you cant even edit data tables?
That’s what I was thinking
also dont forget to factor in saving/loading data in your games systems if thats something you want
you cant adjust data assets and save them for example, but you can structs
I don’t know why data assets are throwing me for such a loop. They seem powerful, I just don’t really understand the use cases. Like it feels like it should all be used together in tandem
i use them at the moment like the.. base sort of item/asset data that i then copy into an array of structs for my player inventory
but im wondering the best use case too
What I use datatables for is for syncing in between CSV files I got in google sheets with the game.
Mostly for ease of life; it's easier, for me, to have action descriptions and stuff like that in an excel document where it can be properly organized and all that.
SO that's one use I can give for datatables. Once in-game I just use objects to store stuff cuz it's more practical than blueprint structures.
Structures I only use for save games if I absolutely need to; though since my game is online I don't really need to ever (because most stuff is stored in server databases)
Components need to be attached to an actor. Each actor that has the component gets their own instance with its own set of variables and state. This means they're good for having similar functionality shared among many actors, while also being an independent thing that exists. Since each component is its own instance, then each component added to an actor will use more and more memory. The thing here is that the component isn't really a means for referencing to a specific thing that is potentially shared. It's more that it's a thing that shares functionality and is given to multiple actors.
Data Tables are pretty good for consolidating sets of data, but that's about all. They can't run functions. They can't hold state. They're not even supposed to be updated at runtime. So that means they're good for static data. While you can pass around the data table and row for a particular data table item, the best you can do is reference the structure of the particular row, but not as a shared object, so each reference you may store of that structure, or row name is consuming memory. So if you had an inventory system that utilized a data table / structure, and had 10 players with inventories each with 100 items then you'd need to be storing at least 1000 structures or row names. Another downfall is that you can't really have "child" tables. You have to have separate tables for each structure type.
Data Assets are typically used as static data, but they can be changed at runtime (but not saved!), they act as objects as runtime and they can have functions but generally aren't used for state. When you reference a data asset in many places, you're referencing that specific data asset, so memory is conserved as you're only normally referencing it as a pointer, not as its own unique instance. You can have a hierarchy of data assets as well. They can also be referenced through the asset manager to look up specific assets.
So data assets are conservative with memory, but they can’t be saved. So what would you need to do to save the data between maps, etc
Data Assets shouldn't really be saved between maps, that's not their use case. They're meant to be typically static data much like a data table. You can pass along a reference to a data asset through a map transition, but you shouldn't generally be changing a data asset at run time.
You can manipulate a data asset during runtime, but you just can't save changes to it --- it's an asset, so it's something that'll exist within the packaged files of the game, meaning you can't actually save changes to that asset when you're playing in a packaged game.
You have to edit the Notify bp, for example "BP_NotifyRagdoll"
Which then accesses the owner of the montage and checks for the interface, and exectures the event
Game Instance persists in-between map changes.
Anything you store in game instance will persist throughout the game session.
An example of a usage of a data asset would be an item for an inventory.
You can define your primary data asset with a few functions and variables that every single item could have, so things like Name, Description, and a function when it is "used".
You'd then create a child of that primary data asset for multiple types of items, so like "consumable", "armor", "weapon" , each with further variables and functions that you need for that asset, and you can override any functions you want from the base data asset, so "used" can do different things for these different types of items.
Your inventory could then be an array of these assets, however, this limits the inventory to the static data of the asset itself, so you can't have dynamic values like "Durability" or "Stack Count" included in the inventory like this. To get this kind of functionality, you'd probably want to create a structure that you can then use for your inventory that contains the Data Asset and any additional dynamic properties about your items, so then you can have properties like "Stack Size", "Durability" or anything else you may want.
So now, you can have 10 players with 100 items in their inventories, but they're all referencing the same data assets in their arrays, so you're not having to store all that data 1000 times in memory, only 100 times - once for each type of item.
Considering they are static data, stuff that doesn't change... such as item descriptions; you should not want to save it either ways since it's data that will never change and all that
USaveGame is the general answer you're looking for here.
BenUI did a good write up on comparison between Data Table and Data Assets here:
https://benui.ca/unreal/data-driven-design/
It’s starting to make more sense. I’m working on an economic space shooter game for school, and Ive just been pulling my hair trying to organize the data aspects and best practices. I just need to get the data work flow down more.
I’ll peep the write up
Static data that never changes usually goes in a DataAsset or DataTable, or DeveloperSettings.
Runtime data that can change , or may need to be edited per subclass or instance goes in things like the Actor, Component, or UObject.
Data that needs to persist maps should usually be stored in SaveGames as all Actors, Components, and their sub-UObjects are destroyed at map transition and you need to rebuild them from the data you save.
I see, makes sense. I’ll have to go over this a few more times but I think I understand! Thanks for all the insight!
Hello guys, I have the issue that my blueprint actor only starts working after I edit it without changing anything in the blueprint.
I have cars that follow a spline. They're set up in the construction script. Now when I restart Unreal and press Simulate, the cars don't move.
But once I open the car blueprint, literally add nothing but "print string" at the end, they suddenly begin to movie. It doesn't matter what I change in the blueprint, only THAT I change something.
It is a very frustrating issue.
I fixed it.
Hey, is theere a node similar to AddForce, but instantaneous?
For using constant velocity on an actor's movement, updated by frame
Force is meant to be used each frame. Impulse is for one time boosts.
Force = Gravity
Impulse = collision bump
Alright, that's a huge help!
Currently I have an actor with a physics component that's activated constantly, but I need it to travel in a straight line, at a fixed speed, with gravity disabled for the duration.
I tried using a different set of nodes but none work the way I needed.
If I use AddImpulse every frame, will I get that constant velocity I'm looking for?
@maiden wadi I just tried doing AddImpulse but it looks like the velocity increases over time...
That's not what I need here.
Add Impulse is meant to be called once. Like a bomb going off. It's a single bump to the object. Force is meant to be called every frame to affect it gradually, like gravity or an air vent.
Generally I would say disable it's mass and gravity and impulse it once. But depending on the object you might also want to look into the projectile movement component instead of a physics sim.
I tried using projectile movement first, and didn't work out.
The issue was that I needed the object to go from physics to projectile to physics, and that didn't function
I could not find a way to make the projectile move.
I'm not sure what that means? The PMC should do all of the physics style sims. What is your use case? Like what is the actual implementation?
It's a 3D platformer where the player has a bomb.
The bomb can be pushed around and jumped on for platforming.
Additionally, the bomb can be hit to be launched, slide up, etc.
I need it to be fixed velocity so it's more reliable and easy to understand for quick platforming, as well as overall simplifying level design.
You likely don't need physics for that unless it's something like red ball
Hey iam searching for a better trace method then I use actuall
Yeah. PMC should be able to handle all of that. And it'll be kinematic, so more stable for gameplay code.
actual I use Capsule trace by channel
and it generates 2 capsules
one at my character
and one before
this one before is cool
Well it's affected by gravity while not punched.
but is there a way to only use one? (before character)
Still if that's your suggestion, how could I start doing it the PMC way?
Ah I got it -.-
If what you mean is the ball will move on a straight line downwards when not pushed then you could also do that through just moving the ball at a fixed or accelerating speed and still not physics, it depends though. If you want something like it bouncing around or it having curves like with angry birb then physics would be better
Currently I don't intend for that. Would using SetActorLocation each frame or similar work?
Right now I set up something with AddWorldOffset
You can use timeline components
Instead of a timeline I just have a timer that opens and closes a gate on start / end.
This is in order to have dynamic travel times, mostly.
@storm shale Afaik timelines are only superior to timers when the goal is to slide around them or have concrete values at concrete points, so it should be the same.
Sigh
<@&213101288538374145> We got a scam link
I'm working in character movement for my next project and I've noticed that if you jump repeatedly while sprinting you build up a ton of momentum. Is there a simple way to prevent this?
Using the default CMC? What's your current sprinting logic?
Max walk speed is 400, when shift is pressed it's set to 800, and when it's released, set it back to 400. I would send a screenshot of the blueprint, but I don't have access to my PC atm.
And yes, I'm using the default CMC.
Your air control is turned up too high. I'm guessing it's increasing your momentum, so each jump is just compounding momentum.
Hmm, alright... Then the issue is that speed gets built up too quickly when doing that.
Yes air control seems like the issue, perhaps some max walk speed changes while jumping if you have anything that touches that
Max walk speed should reset your velocity when you hit the ground. But I guess maybe jumping fast enough doesn't
There might be a max velocity option that I can't remember in the movement component.
Ok, I'll look into that.
there is no way to do a delay in functions, hm=?
Nope. Functions execute in a single frame
You can call a custom event though that has a delay.
Nope.
🙂
Lol yeah. Always a trade-off.
Hey we use world partition for better performance, but it also has the issue of not destroying objects. We run destroy (self) on collectibles but if the player unloads and reloads that section of the level they will be back... Is there a way to avoid this?
Local variables are the same as a normal variable. If you want a local variable with ease of access go to General macros and make one that simply creates a local wildcard
edit: that way you can assign it and essentially have the ease of life of a local variable.
Either ways trying to not use as many local variables or any is better, but also not important really and won't make a difference generally speaking.
I assume a save system would work. RamaSave is a component based system you can snap on to save actors. Not sure how it works with world partition.
The way we handle this in our game is with an event system. Each player has an array of name events granted from quests, dialog or picking up unique items. When the item spawns back in during a reload if the player has that event in the array then it sets it to hidden in game or destroys it.
Mhm our project is sadly very disjointed but I can see something like that working, cheers ^^
yeah thats possible... I doesnt do that so far because I want to avoid chaos xD
thanks
Anyone free to offer some help to noob with LODs and draw distance im trying to make a sniper game but the targets arent rendered at the distance im trying to snipe at.
If you ever need a local variable.
Consider if you can transform that into a pure function which outputs that value. Just a tip that sometimes works other times not; depends.
Working with pure functions (blueprint 'pure' functions) is fun.
yeah I do this often
actually I implement multiplacer stuff and there some times I need delays
or have to rething some stuff more
If you're fine with adding a C++ plugin, SPUD can do these things automatically.
Though I haven't tried it with WP it's supposed to support it.
It was designed for sublevels primarily, though.
Is there a way to stream levels in and out without reseting them
Say a player has already visited a level that's been streamed in and I don't want it to be as if they never went there before
Needs to be part of your save system
SPUD can do that too :)
But instead returned there but obvs still leveraging the level.streaming advantages
SPUD does persistent level streaming.
What's SPUD
You could keep the persistent items in a different sublevel that doesn't get streamed. Otherwise, no. Once a level unloads, it's going to be reset.
If you have a save game system already you can set a reference to anything your player has interacted with and save a reference to that and load it on level load.
Hmmm save system doesn't sound like a bad idea
It's always a good idea to implement a save system early in development.
It's much harder to tack it on later.
Well I have one kind of
Does anyone know if I can stop an animation montage if my AI is falling? I'm kicking them off the edge but they aren't falling untill the animation stops playing.
It's super basic at moment though, might have to have a proper think
Might do it like darksoles style
Where things reset to an extent
But like mentioned above I could.mark certain stuff to be saved
Depends what they are though
Like something collected I'd want to destroy it next time, something interacted with however I wouldn't want to destroy like a door being unlocked or something
Yes you need to save a reference to door open or closed state and you can just load that on level load
i have some floats coming in as a stream, what's the best way to collect them 3 at a time and make it a vector?
We can't save references to stuff and we
Like a ref to the door
Can only save float, vectors etc
Boolean isDoor open yes/no
Which means I'd prob have to save a string to identify that door and then it's value so as you say there
Just so when I reload level it can grab the right value for its stuff
Won't an object reference break on reloading the level though since they're new instances? Or is that only an issue with spawned objects?
Yep
should I use a sequence ? there must be a better way
Luckily I know a game that does saving in a interesting way
Yeah, you need to work out what actors you need to save a reference to and add them to an array
Well you can't save references so I'd have to have the array be a collection of values I want to save unless you can save references to actors
Not if they have a before and after state
I highly recommend investing in a save plugin for this.
I use Rama Save. You simply add a component to any actors you want saved and add and variables you want saved
Depends on your save system
hrm hrm SPUD can save references as long as they're in the same level
lol, this guy is pretty set on SPUD, id check it out...
I get the feeling SPUD is a good option for some reason. Lol
This would be level streaming though so
Rama is $100 but I've used it for years. If SPUD is free it's probably worth checking out before you buy a plug-in or write a whole complicated save system.
Yeah, we bought Savior then ended up using SPUD anyway
It has served us well at least!
I don't mind making something and my game is super early in development so
So, any ideas guys?
I'm.type of person where I'll try to make it and if I fail and don't have time to reattempt ill probs go for something out there
Thinking I might need to trace from the feet to see if the AI is on the ground or something similar
If you have a Character Movement Component it already does that check for you.
You can retrieve the struct for ground checks... what's it called...
LastGround or something
Oh nice
The anim montage plays in the air
And then when it ends
The enemy falls
So if I check last ground, and set ragdoll if not on ground or something
Probably works!
I'll give it a go, thanks
I think it also fires an event when you land, not sure if it does it for when you leave the ground, too.
Yeah, so I might need to IK trace the floor
anyone?
this ain't it lol
To see if there is floor under them, if not set ragdoll.
As the anim montage is causing something looney tunes esque
feels like there should be one node that does this "every Nth item receive, create a vector of size N"
🙏
Just after For Each Loop, create Vector and add it to Array of Vectors then you can access all 3 different vectors from array (on for each completed).
i just want one vector
A multi gate can do that
the stream is coming in as floats X Y Z X Y Z ....
how
what do you need exactly to happen? this for each loop goes so fast that it will always get the last set of vector
?
the stream is coming in as floats X Y Z X Y Z , I want a vector of the changing X Y Z
why is it coming in as floats and not as vector?
yeah actually sorry it's actually coming in as an array of floas
floats*
then I was iterating through them but maybe there's a way to go directly from the array to a vector
it's a stream of data coming in over osc
\
Get OSC message floats is spitting out a stream of X Y Z
I think generally you'd just make a for loop which steps in strides of three, then read based on index in the array.
i + 0, i + 1, i + 2
things like this are a little cumbersome in Blueprint
does the For loop (not ForEach) loop in BP allow you to specify the stride?
I don't remember
if they are always coming in this order then you could do it simple like this?
the order is constant
you might want to Set it first before feeding to Vector though
i will try this
yes, and then just have the index be IncomingIndex / 3 + 0, + 1, + 2 etc
or do math before hand and do a loop from 0 to LastIndex / 3, and just multiply and add
A multigate let's you trigger something every nth time. I have no idea what you're trying to do though.
For i from 0 to LastIndex/3 -> MakeVector(Array[i], Array[i+1], Array[i+2])
there's probably an off by one in there but that's the general idea
working, tyvm
np
Hey there, so im having a hard time figuring out a simple thing
so i have a building system and inside it i do a overlap check so i would check for the other building parts and not spawn them on top of others
and my issue is the way i have it now wont allow my to spawn the windows or doors in there place in the window wall frame or door wall frame
here is a full video of what i have
any suggestions or ideas would be good Thanks
You could use tags and assign them to each part then check before placing and base logic on that.
i have tags there but the issue is i don't know what's the logic that should be applied that's why im asking for suggestion
Random question. How do people get their BPs to look like this? I think I remember someone mentioning once that it's a plug-in, but I can't remember the name of it.
plugin but honestly I like vanilla the best
just use re-route node and stop making spaghetti
plugin called electronic nodes
makes it look really nice
Thank you
I agree, I really like the look of it.
yeah you need less reroute nodes from what ive experienced, and it lets you make cleaner looking stuff than is sometimes possible in vanilla
highly worth it in my humble opinion
any help ?
Where’s your spawn function
here
Change collision handling to always spawn ignore collision
its not about collision
Ok, maybe I misunderstood, what is it about
the way i have it is correct but i need to make an exception for the doors and windows
so they wont be affected by the overlap box
did you see the video
everything is shown there
No I can’t watch videos where I am rn
i see
You can make custom collision channels
If you don’t want certain objects to be affected
I mean you could also trace for certain objects instead of overlap but yeah
yep thanks mate it works now
a workmate told me a struct should not have another struct inside it, when this other struct has also this struct in itself
is this true?
i had some structs breaking apart, and im assuming this is the issue, though im not sure
does anyone know why this doesn't work when playing as client? It does work when standalone
Circular linker loading dependencies.
Struct A needs Struct B
Struct B needs Struct A
ActorA needs Struct A.
You start loading ActorA, so you start loading StructA, so you start loading StructB, but you need StructB to load StructA and StructA to load StructB. So code just has to resolve it by picking one, which breaks things because one initializes before the other can be loaded correctly.
so this is to be avoided always, right?
a struct cannot contain another struct that contains this struct
if struct A needs struct B. then struct B cant have in itself struct A
its just a programming rule that we must accept, even though it would be nice if it worked...?
You can only send server RPCs on actors that are owned by clients. Seing as you're calling this on an actor of type "STButton" this leads me to believe this isn't something owned by a client.
yea it is meant to be a button in server
this actor is not meant to be owned by any clients though and any player should be able to request to it
how do i achieve that?
You send the RPC on something that is owned by the client.
An example would be a generic "Interaction" RPC where you pass along a reference to an actor that the client wants to interact with. Once running on the server, you could use an interface or call to an interaction component on the target actor to then do what you want it to do.
Then you can use that RPC basically any time you want to allow the client to say "Hey I wanna do something to this actor".
m... Are there any guides I could follow? I'm having trouble understanding yea
Pinned resource in #multiplayer
Look up ownership , and everything else written since that's basic of unreal multiplayer
Is there a way to get the duration of an audio component in order to save it and send it to the next level starting from the same point that it was in the last level?
Sure, store the data in game instance
yeah I know how to save it, but how do you get the information?
Get your audio and see what's exposed. I personally have done it long time ago so I know it's possible.
yeah I'm sure it's possible too but I can't find the way and Chatgpt keeps feeding me lies🫠
No shit, just grab the audio component , type get and see what's exposed
Chat gpt gonna tell u things that don't exist
@vagrant cobalt instead of chat GPT, try googling
https://forums.unrealengine.com/t/how-to-get-current-playback-time-position-of-the-sound-playing-on-an-audio-component/388587/2
You can do something like this: As soon as the audio component starts playing, that callback will be fired off on every tick update for the sound. You can get the current position of the sound by multiplying its duration by the playback percent (playback percent is between 0 and 1).
uhm, how could i could go about solving this? basically im trying to increase fidelity of my collision checks
basically my collision checking is failing coz it's FPS-locked
so far i've either got do clever math or create a background async task (basically dedicate a new thread), but there's no good tutorials i could find on how to set that up
or something like this https://forums.unrealengine.com/t/how-to-make-collision-detection-for-fast-melee-combat/23531/14 (trying to avoid C++ coz component is BP...)
I came up with a slightly different partial solution that I felt like sharing. Character rotating at low speed Character rotating at higher speed Character rotating and moving at high speed The green lines are showing the line between the sockets. The red lines are computed. FVector curBase = GetMesh()->GetSocketLocation(FName("St...
I assume it's calling like trigger but if you can get the duration why can't you get it just from The Sound itself also this event is not getting called at all
You can get the duration directly, but what you want is the current playing time... which is playback percent
Current playing time in second = Playback percent * duration
is it possible to change the volume of a Play Sound 2D while its playing, I have a float variable that changes and when i use it on the play sound 2d it doesnt change the volume until the sound finished playing
yes with sound class, but it will change the volume for the entire sets of group. If you need to reference a sound object, use audio component instead of play sound 2D.
Play sound 2D is designed with fire and forget in mind.
if you want to control the audio level in individual sound object then yes you don't want to use play sound 2D
altough why would you do that?
I have my sound class grouped as
Sound effect
Dialogue
Ambience
UI
and I control their volume from the settings based on user preference
i dont want the sounds to play full volume i want it to certain sounds to play louder as the meter goes down
yea I am not sure what you really want or need
btw for the sound class you have to add to each audio which class to use right?
so it wont interfer with other sounds
sure, in the sound settings
and I control the volume based on user settings, I don't see a reason for me to elaborate on my system
if some sound is too loud or too quiet, I will just change it on the individual sound setting
Is theree a node for teleporting player to some coordinates.
Are ***Scene ***components inside actors expensive? Could I use them to ''categorize'' components on actor or it's a waste of resources?
I want to teleport the player once the player activates the triggeer.
You can try to Set Actor Location and checkbox Teleport
Everything has a cost. How much is dependant on what it does. A scene component has logic for displaying meshes in the world and other things. If you just need something more for just data, an actor component might be a better option. (The base of all components that can be added to an actor)
how to get actor world location as viewport coord screen position its in?
DeprojectScreenToWorld @keen widget
but.. its other way.. i need to get where my actor on the screen
this gives me his world position that i already know
ProjectWorldToScreen then
damn, this server is getting attacked relentlessly
@dark drum Bots spreading malicious link, the mods had to ban 3 times
fake steam gift cards link
Ahhh, well the mods are doing a wonderful job as I never noticed lol.
I created an inventory system, but I need the player to drop everything when they die. What is the best way to make it so that every item is dropped if its variable is true? I thought about making a sequence, but that would take a lot of time.
I’d use a for loop
okay thanks
So like this right?
ohhhhh that is way easier, thanks
I store my items as a uobject item base. The drop item function just spawns the world item BP, assigns the item object to it and then removes the uobject from the inventory.
You should be able to make the general concept work for how your system is setup.
Oka thanks that makes sense 🙂
Holy shit
Is it that bad
Yeah using Booleans like that and using multicast
Multicast is not for stateful behavior , this is not gonna work.
Im also using another method now
Late joiners and players outside relevancy will not sync
Whait how do i do that then
Can't sit down and talk about multiplayer design
Just add all items player has to array and for each whole loop to drop item, you can check if is valid item of array.
But I would have the server drop the item.
If it need to spawn an item on the floor that's fine, server can spawn an actor that is marked as replicate
Here pattym gave you solution and you did some magic with this array of booleans xD
I pray you don't use Booleans to represent your items
Not scalable in the slightest
It might be easier to store your objects as a data asset, especially if it’s multiplayer.. and use the data asset as a reference in an inventory list. If I’m understanding data assets correctly
And then for each loop those suckers outta there
I’m trying to understand data assets and their usages. So I could very well be wrong
I would contain the item as a struct. But I know some people prefer to use UObjects
I tend to think in terms of pure OOP, and that seems like it would be the natural progression, with inheritance. So I guess it depends on what you’re trying to do and store on the weapon.
I'm trying to work with XR in Unreal 5.3. We upgrade from 5.0, where we were using SteamVR without issues.
As SteamVR was removed in 5.3, we need to work with the XR Plugin.
I need the transforms of the Vive Lighthouse and the Vive Trackers. I would assume that this code does the trick:
But only thing that is returned is the XR Platform "OpenXR". That does not seem right. What is the "Get Device Pose" node for, if only the XR Platform is returned that can not have a Pose
Should always be avoided. This kind of data structure requirement is a bit odd. I'd be curious to know what your intention is with these things needing to know about each other? Chances are there might be a better way to handle what you're doing.
Structs are usually a lot like any other programming class. Take UserWidget hierarchies for example. You make a widget class, and you use that in a container widget. The child here should have no knowledge of the parent. You have a parent that manages a child. And that child can be a parent to another child. Children are made for a set reason and shouldn't care about the parents. Parents manage their own children. Structs are simply sets of data. A set of data should not care about the struct container that is holding it or you end up with an infinitely branching larger set of data.
Take StructA and B example again even past linker loading. Structs are sets of data. And data has to be allocated to memory when you create an instance of something holding one of these structs. So you have an Actor with StructA. You SpawnActor and create the actor with StructA. You allocate memory for A. A has a B so it allocates memory for B. This first B has an A in it though so it has to allocate memory for that. But that A has it's own B in it so it has to allocate memory for that. And this B has it's own A, so it allocates memory for that. So on and so forth forever until you end up with an out of memory error crash. Cause you're creating an infinite tree of data where to create an instance of one struct it has to create an instance of another struct.
It would be the same as having an Actor, with a Component where the Component spawns the Actor of the same class that created it. Spawn the actor, Component initializes and spawns a second actor, that new component spawns a third actor, new component initializes and spawns a fourth actor. etc. etc.
In my context its this:
I have items and created a struct for items, and some of these items are clothes that characters can wear.
So i created a struct for clothes.
When i pick up a cloth from the floor, and wear it, sometimes i need data about how its going to fit in the character.
So the cloth is simultaneously a cloth and an item. So i included a struct in it that is included in the other place.
It would be the same as having an Actor, with a Component where the Component spawns the Actor of the same class ...
makes sense
@frosty heron I sort of do this with my inventory. Each item instance is a UObject which has an array of attributes(A gameplaytag and float struct), a gameplaytag container, and a pointer to a data asset.
- Attributes are for like stack size, durability, etc. Any runtime changeable value.
- TagContainer is for tags on the item. EG to make it invulnerable.
- DataAsset pointer points to the item's static DataAsset. This defines what the item is. Has it's name, has it's unchanging attributes, descriptions, icons, etc etc.
Inventory component houses an Array of UInventoryItem which is the above explained UObject. You could do the same thing with an array of structs, but using UObjects allows for much easier management, specially once you get to UI, which is a huuuuge thing for inventory. EG I can copy my array of items, sort it, filter it, do whatever to it and then pass it to a tileview or listview. I don't have to care about maintaining indexes or array orders or guids or anything as the object themselves serve as those.
I will print screen this word of wisdom before I work on my inventory system
still divided if I want to copy Lyra Item or role my own
Just remember that if you do multiplayer. Do not rename the object into a new outer when moving it from inventory to inventory. 😄 You have to copy it into the new outer and destroy the original. Neat little replication bug where if you have ObjectA on ActorA's inventory. You rename it into ActorB's inventory. Then a minute later destroy ActorA, the item no longer replicates. Cause it was still using it's original owner's ActorChannel.
i have little bit complex question:
i made ability to drag this 3d plane with mouse, but when i drag it by the corner its snaps to plane middle origin location, i don't whant that
any idea how to add drag mouse offset to this?
this picture is 3d plane in 3d space, not 2d!
Did you try to adjust it in the viewport?
this how i did it
https://blueprintue.com/blueprint/b7mskkrp/
So when you click on the plane, it snaps the cursor to the middle and you want the cursor to stay where you clicked?
yes 🥹
I want to retrieve information from an array of TSubobjectOf<WidgetClass> in a data asset and create these classes within SynchronizeProperties, allowing me to change their position and size in the editor. However, when I add these created widgets to the canvas using AddChildToCanvas(), they become visible in the editor but are not clickable. What could be the reason for this?
I think in this place before you Set Actor (plane) Location, you need to do some calculations like:
Get Cursor Location (where it was clicked).
Get Actor Location (of the plane).
(Vector) Start Cursor Location- (Vector) Clicked Actor Location = Offset
Then before you Set Actor Location, you add offset to the Current Mouse Location (so to your X and Y that you splited). Does it make sense?
And If Vector - Vector won't work, then maybe you could try Vector Distance node (v1,v2), but first try to calculate offsett I think.
What do you mean by they are not clickable? Provide some screen shoot
ill try that, thank you!
is that right?
Yes this one but you need to specify location or it's gonna teleport it to 0 0 0 in the world location.
and as target you specify actor to teleport (unit, character, building, box,)
it can be self as well
Hey, that doesn't work.
Player Controller is not actor that you can teleport, you might want to take player character depending on what game you are making
?
sorry for being late. as you can see they're visible but can't click or edit their defaults. also they are not shown in hierarchy
Depending on what you want to be teleported.
@stray trout add them as child to your Canvas panel I suppose
The player.
yes
First try and then ask if it doesn't work
@stray trout are these done in NativeConstruct?
yes also called in nativeconstruct too
If I want to copy and paste this event track with all of these triggers that call for lightning to flash into a different sequencer does anyone know a quick way to rebind all of the keyframes to the new BP which is assigned to the new sequence? When I copy the event track over they are all still referenced on the original sequence so I have to duplicate the BP and make sure it is connected to the new sequencer, however it only let's me individually select each node to rebind it to the BP with the new shot.
Guys can I please know how to pass a variable from blueprint A to blueprint B?
My specific use case : on collision of Blueprint B I want blueprint B to access variable of BP A and update it
I am a beginner and having ambiguity tried various methods didn't work can anyone please guide me would be helpful thanks (when player enters blueprint B collision I want to update blueprint a variable )
@clear marsh watch Blueprint Communication video by matthew
hi, i'm doing my first test game, i spend two days on different tutorials doing bunch of blueprints but all systems i found are more advanced and i want my first result now, so i can be happy about it knowing I can develop more stuff later. (you know, small goals, better results etc)
Primaly goal of this game is to pickup mushrooms and feel good about it. the player goes around and pick them up so he/she can effect some visial changes on the screen - thats the first basic mechanic. - One player, one item and the result is for only to change visual settings of game for now (saturation, contrast, music etc., I add more stuff when i more familiar with the engine).
Could you recommend some tutorial with similar mechanics i described or show me how i should do it? I will apriciate it and of course share the results to interested ones :D.
keep learning and have patience, chances are you are going to re-do most of what you've had.
Start with Blueprint communication video, OOP, variables, functions, structs, etc.
Once you are comfortable with OOP you can look at some interaction tutorial or look at sample projects if you are comfortable reading other people codes
Do you guys think it's better to:
- Create set of
Action Buttonsfor eachBuilding, add them to oneWidgetand then take thatWidgetas a whole and then add/remove it to the wrap box dynamically.
2.Or it would be better to create like10 empty Buttons, and when you Select Building it takes the data from the building and populates each button with that data?
On one side I feel like 2nd approach is better because of how dynamic it is, but on the other hand it there are 10 buttons, each of them would have like 5-6 variables, and doing it every time we switch would be a little bit over the top?
I'm also thinking about using a bit of both and just doing 1 ''stale'' Row of buttons and 2nd Row that would be dynamic (in case we select 2 different Buildings (maybe Units with unique skills would be better example), so in 2nd row we would see 2 abilities next to each other. And in that case, I'm not sure how to bite it.
Imagine we have 2 units, each of them has 1 Unique Ability, that if one unit is selected, that ability is 1st in the row with a hotkey Q, but if we select 2 different units, in the first slot we should have ability of 1 unit and in the 2nd slot we should have ability of 2nd unit with a hotkey W. Do I use dispatchers here that listen when units are selected and get only unique data. Anyway it gets a bit complicated whose cooldown of ability we should show? Last time we clicked ability or of the unit that has the lowest cooldown? What would be the best high overwiev I should use here?
So i have this weird thing in which having 0 lux on my directional light doesn't make everything pitch black, and my sky atmosphere doesn't work even when light is on. How do i fix this?
Images:
#lighting message
Hey guys, im trying to make a pretty simple 'throw ball' thing where on hold, the ball will stay attached to my 'Arrow' Socket. Am I going about this the wrong way?
The ball is spawning, but it's freezing in space when it spawns in, not actually attaching to my Arrow socket
okay i figured it out AFTER i asked this 🤣 I set my BP_ActorBall to have simulate physics turns off by default
It’s taken me literally 24 hours but I totally get data assets now.
But that just opens an entire can of new questions
Like… is best practices with heavy data dependent gameplay to have bigger databases that are called to fill in data assets at runtime?
You don't normally set data asset properties at runtime. They're meant to be used for static, unchanging data.
i have updated my blueprint but it doesnt appear in the scene
Realistically, you should create one button. For pretty much the entire project.
The reason being is that 99% of buttons are all the same. At most they have the same set of things. A background, a border, an icon, a progress meter, hover and click visuals and sounds, and callbacks for being clicked.
If you're good enough with materials you can even put all of this in a button that is nothing but a button, and a single image, which keeps your widget hierarchy small. At which point you have a basic button widget and material that can be reused for specialized buttons, like say a special button where you have to display tiers or other things which would need a new material. Or maybe you simply put it all in the core material and disable it on most buttons.
Either way you end up with mostly a single button class which other containers can use and bind it's callbacks for things.
just the sphere and when i play i dont see anything
is there any reason that you want to keep the data asset number below 10? Or is that just like a ceiling they teach? What if I had hundreds of weapons? I still want the functionality of the data asset, but for that they suggest datatables.
Where are you getting this value from? A data asset is just an asset (like a static mesh or texture) but is housing data.
My teacher.. lol
If I have a construction script that spawns a bunch of meshes and places them around a map. Do I need to also run this same logic in beginplay to spawn these? Or will they be saved into the map when the construction script runs at cook time?
I figured that it didn’t matter but was being told something else. So definitely confused.
In curves:
is it possible to input mathematical formulas to automatically generate curves, or do you have to manually input most values?
Why do you need a curve if you have the formula?
From what I gathered about data assets, it’s faster cpu wise to reference an object rather than sorting thru massive lists
just for organisation purposes, unless it is heavier to store a curve than making a function
Hi, is it possible to "respawn" agents instead of trying to reset them after every Episode?
This makes little sense. You can literally have thousands of assets. I think maybe what they are trying to say is that if you're getting into the realm of having more than 10 assets it can be cumbersome to manage that many of them (each asset will become its own file) at which point you should consider using a data table, but I think this is also poor advice. Data Assets allow you to reference the asset for what it is - an unchanging "object" of some kind that exists in your game and all references to it point to the data it houses.
Is this where the asset registry comes into play?
Kinda a dumb question...but if I'm using an RInterpTo node, what math do I need to do to determine what time the rotation should end? I feed it delta time and say a speed of 2. Can I figure out the end time of the rotation?
Unreal crashes after I compile literally anything and it just spits out this Assertion failed: Index>=0 && Index<NumBits [File:D:\build++UE5\Sync\Engine\Source\Runtime\Core\Public\Containers\BitArray.h] [Line: 1404]
Not really.
The entire point is, is that if you're using a Data Table, it only allows 1 person to edit entirity of the data table at a time, and if you want to get data out of the data table, you will effectively be loading the entire data table, and will need to store either the row name, the data table row handle, or the data contained within the row of the data table, all of which are going to be larger than storing a reference to a Data Asset. A Data Asset can only be edited by one person at a time too, but only that one particular data asset. SO if you had thousands of Data Assets, many people could be working on different Data Asssets at a time.
Got it. That makes sense. All data assets are loaded at runtime, so you only need one reference for numerous other calls.
No?
lol
Oh.. but if they’re referenced on one actor, it’s loaded for everyone? Or no?
Yes
If it's in memory, it's loaded the one time.
Any other things referencing that asset are pointing to the same thing.
Which makes it way more efficient then having to bog memory with a database call every time something issues an event?
the asset registry is only used in specific scenarios, but generally
instead of using row names to find a data table row
you use a soft reference to a data asset and async load it or block load into memory
Yes, or having to keep a reference to the static data of a row of a data table, or a row name, etc.
Ok. That makes perfect sense! Thanks.
this is very impactful because for a data table you have to do "look up search" of potentially hundreds of row names, where as if you have the reference to the asset, you already know where it is, there is no need to look up anything, just load it
Now, does there become an issue of having too many data assets referenced at once?
what do you mean?
If you’ve got thousands of data assets referenced in memory, does performance take a hit?
Or is it still more efficient than searching databases
that's why you'd use soft referneces, not hard references
also, when searching a data table you are block loading, meaning the game freezes until it grabbed that asset you are look for, and if you are doing many look up calls of heavy assets, it will be very noticeable by the player
whereas if you async load them from soft references, you can load them in background without the player noticing
Do you mind explaining to me the difference between soft references and hard references? I guess I haven’t processed that part
when referencing anything, they are basically pointers (or adresses) to the data you want to use right?
If anything Data Assets are more efficient as you only have to load the data assets you need to access.
A Data Table requires you to load the entire data table.
Hi!
In blueprint, can I query the Firebase database without Firebase plugins on Epic Games?
I know of a plugin "VaRest" that does something like this, but I don't really know if there is a way to do it more simply with Unreal Engine 5? I need to store just player data.
when referencing them:
Either they will be loaded into RAM that way you can access their data right away (hard ref)
Or they won't be loaded into RAM, and instead they'll stay in the ssd or hard drive (soft ref)
It is very important to use hard and soft references otherwise your game will eat up way too much ram than actually needed @dawn gazelle
Yes, but that's not really the question currently. If a Data Asset is loaded, it's more efficient to have that Data Asset loaded then it is to have a giant Data Table loaded.
Soft References are the way to go of course 😉
Pointers can be reassigned to point to different objects but references can't be changed
thanks for the C++ fact
you should never have a giant data table loaded...ever, it would eat far too much ram
In order to access a data table, you must load it all 😛
no? Only the row names
Which are in a TMap (from what I've been told)
Meaning you're loading the entire data table whenver you want to look something up in them.
hey guys, what is the proper way to deactivate a 2D sound? Im activating a sound on hold a key and deactivating on release the key but when I deactivate it is always giving me not valid despite this being on my begin play, why?
that would be very weird if that were the case
hopefully someone can answer if all data table data gets loaded when an asset look up is happening
use case of data tables are no for storing objects like textures, meshes etc, you should store their strict data like some some value, floats, ints, bool etc
for data like UObjects, use UObject directly as instance only
or data assets
Yep, looking at the underlying C++, it's stored as a TMap, so when you access a DataTable, it has to load up its TMap.
Eventually when looking up the row it does this:
uint8* const* RowDataPtr = GetRowMap().Find(RowName);
but does this cause the values to be loaded?
The TMap can't exist without the values being there.
Otherwise you're pointing to nothing.
It should only ever need to be loaded once at least.
Interesting
is there no equivalent to soft and hard references in C++?
so to awnser your original question:
If you have basic variables like floats, ints, bool or soft references, you can store them in a data table
But if you have bigger assets like skeleton meshes, textures etc, you'd put them in data assets in your files
So basically, you’d have one active blueprint for a weapon type, and just load the data onto the blueprint at construction?
Instead of having a hundred different blueprints?
yeah, it is better to have no hard references to assets in your blueprints, or very few for those specific scenarios
keyword "to assets"
Ok, I think I may be mistaken... I'm not great at reading this type of C++ as a lot of is templated and stuff...
The actual row map is:
TMap< FName, uint8 * > RowMap
Which signifies to me that it is just a pointer that it may be referencing. But the comment on it states "Map of name of row to row data structure."
the neat thing is that data assets and blueprint aren't completely different, you can make both have variables to get and write, you can make functions in both, but both are used for very different tasks even if they could somewhat replicate the other
Makes sense. I’m surprised it isn’t taught more. It’s the logical approach to data in OOP. I only discovered data assets by accident.
yeah, data management and optimisation is very abstract but extremely necessary
learning it late into a project can be very rough
Hey everyone,
I am encountering an issue with a UI element I am trying to implement. This UI element is a spinning arrow that goes 180 degrees left and right. I am trying to get this to spawn directly on an arrow componet I have placed attached to the character itself (in its BP). I can not for the life of me get this to center properly on the character or spawn with him. Screen size changes it, along with it just naturally being off. What do you guys thing? I am having a hard time doing research on this for UI.
Thanks
Hey need advice on how to do a basic "lock on target" im currently using a tic event to set car rotataion towards target but its kinda clunky
what other ways is there to do it or advice ?
You might want to use a timeline to delegate the transition so it’s smoother.
Right; I could be mistaken. But that’s how I’d initially try and approach a smoother transition
yeah but then i would have to update the timeline in a loop also
i mean it could work
how dose the camera attach to the actor now ? itsn ot possible to change the "follow target/ look at target" ?+
I’m not sure on that
it what way is it clunky?
the snap is too hard?
yeah
describe the concept of a "soft snap"
welll i would imagaine it would be like the camera "lag" settings kinda
what the transition to be smoother
so it would snap to the target, but with some sort of delay?
That’s definitely something a timeline would handle. You’d just have to adjust the time to snap. And reverse it on release
i mean i kinda updated the loop from 0,01 to 0,001 and its way smoother
but will cost more preformance i suppose
you could have a lerp function on tick
and have like the alpha be "the snap rate" since 0.5 would be an inbetween value of the current camera and target, and 0.75 would be much closer to target etc
hmm
keep in mind, if it is on tick, you may want an alpha of 0.2 or 0.3, since each tick is like 1/20th of a second, I think
np
I'm having an issue with radial damage not applying to enemies unless they are directly hit. But the player takes the damage just fine with the same damage system.
never mind i think i found how the player is taking damage
also i have these annoting print strings popping up but i dont remeber wher i put them any ways to locate from log or something where theyre at xD?
make a new one and right click it. on the drop menu go to refences and find all by name
Is there any bug with Arrays with texts? I cannot print every text from array, 9 is lenght of the array I print at the start of begin play.
amd you are printing 10 times
Yeah, and the buttons get created normally, just cannot set that Text
Let's step back from setting the text
just tried to test the most simple way because after 500 tries and still not getting these strings/text set I was thinking wtf is going on
I tried strings and texts
You are looping more than you should
Nature building length is 10, hotkeys is 9
Don't you get access none when exit pie?
Wow, you are right, it prints 9 and 10, why. what.
How did you know it?
I'm gonna try to reset unreal.
This information is entirely false and incredibly dumb coming from a teaching standpoint. A Data Asset is identical to a Static Mesh asset. Imagine trying to make a game with ten total static meshes.
There is no correlation to the amount of things to the container. Data Assets for complex sets of data. DataTables for simpler sets of data that can be specifically defined in a struct.
Even with datatables you can end up with multiple tables for the same struct. An example of this is crafting. My crafting system is nothing but a generic array of inputs and outputs, description, and craft parameters like time. And I want to bundle these based on the system. So a basic example is that I might have Campfire, and a Cast Iron Stove. I want to allow the Stove to make the same things as the Campire. But I don't want the Campfire to make the same things as the stove. So I make two datatables. I have a T1 Cooking, and a T2 cooking. And I can make a composite of them for a new table of both. I place the T1 in the Campfire and the composite of both in the Stove. These objects now have a datatable of only the recipes allowed for them so they don't need to do special filtering and bullshit.
Meanwhile my Campfire and Stove are special, more complex things. I need names, descriptions, requirements, actor classes for use, skin sets, etc etc etc. So these two are defined as a Data Asset. I'm certainly not going to make a builder game with only 10 buildings.
It worked. xD
now it prints 10 and 10
Right… so you would have a list of ingredients to make a sword… ten iron, five wood, and those recipes are stored in a data table. But when crafted, the weapon would reference the data asset on creation, and populate the blueprint…
Can you reference the data asset in the data table?
The Data Table would reference the data asset that gets created. Your crafting station when finished crafting based on the ingredients would spawn an "Item" blueprint and feed in the Data Asset it created, and the item blueprint creates itself based off of the Data Asset.
SO yea, you still need 1 asset per item, which is no different than 1 blueprint per item, but you then don't need to spawn an item just to reference what it is... So if you had a shop for example, you can list off a bunch of data assets without having to spawn all the blueprints for them to be able to get their details (or load their CDO).
Since GI doesn't have BeginPlay, is Init a good place to cache things in (i.e. a cast to PC to get a pointer stored therein)
tho I now wonder if I should just make the PC listen to a GI dispatcher rather than do it this way
I don't think PC would even be available at init. But you can try
Ahh I see where soft references are now:
I think I might go to option 2 here. I'm essentially just increasing score and having the HUD update, so it's prly best to just have the PC listen for the GI's calls to increase score
Aa I understand it, controller are made thru game mode. And init in Gi would have happend way before imo.
Your hud would be created later too right? I would just get initial value for the widget on construct then start listening to changes by binding delegate
it woudln't be happening on init
Yeah I don't think init is the right place for any of this.
I have IncreaseScore events in the GI, at which point I can call dispatchers so the PC being bound to them can handle the rest
lol, I tried to cheat by copying an event signature into the dispatcher and then deleting the event, so the engine crashed at runtime 😅
How would you guys do this: I need to create 5 buttons, each with different event. Do we individually create each button (with some universal base of button), or do we create enum attack, stop, hold, create 1 button with logic, then when we create widget, we feed enum, and inside this one widget we switch on enum (for example Binding On Click would switch on enum to call to different Events.
Depends on if the button is generated at run time in a loop.
If the button widget is placed in the editor, then you can just have your button widget call an event dispatcher on the widget and then bind to that dispatcher to do what you want.
If you're generating them at run time in a loop, then you'd need some way to identify the button when its being created, so yea, you could use your enum or gameplay tag, etc, and then have it as an exposed variable that you pass into your button when you're creating it, and then have your event dispatcher in the button to have an input that passes back the enum/gameplaytag so you can bind to the event dispatcher in the loop and still identify which button was pressed.
Is this actually how you get teams working in unreal? it seems to work if i print string etc, but it seems so wrong
Which one would you choose, because it seems like both options are viable, i was wondering what seems better? The buttons would be either generated on runtime (if enum) or in 2nd case I would create each of them manually and just put into the array for easy access (when to show and when to hide). The base is already created (not on runtime).
i run this on onpostlogin
It's not about what is better, it literally depends on if you're generating the buttons in a loop or not. If you're creating them in a loop, then you will need some way to bind to the button being clicked which means you need a way to also identify what button was clicked. If you're not planning on creating them in a loop and maybe only have a handful of buttons, it may be less time intensive to just manually place and bind them.
Ok, thank you a lot 🙂
What is this node? Is this a preview version or something? Why does it have a success output when the execution paths are literally telling you if it succeeded or not?
uhhh
Sorry just confused, I've not seen a cast like this.
oh its because i made it pure and than undid that
How to spawn an actor through blueprints?
Spawn actor node
Have you try anything? Try right clicking on a blueprint graph and type what you need
the cast seems to work.. so i'm just gonna leave it like that i guess xD
This is one potential way to handle teams, but the playercount variable doesn't seem very reliable. What happens if you have some players leave and then have more players join later?
Instead of using a switch node you could also consider using a "Select" node to streamline it.
ohh cool
fair point. i will do more research on teams. this is my first time trying to get teams etc working. i'm impressed it seems to work. but it feels so wrong somehow.
What I would maybe do is first get a count of the players on each team by looping through your playerstates and keeping track of the number for each team.
Then based on that get the team with the lowest value and add the player to that team. If there's more than 1 lowest team, just use the first one in the list of teams.
Unreal does have a Team interface as well, but if I remember right it needs some C++ work.
mmm i'm gonna try to keep going without c++ gotten this far already xD
eventually i will have to, but yeah
What kind of game are you doing?
oh i'm stupid, i'm trying to make a cardgame like heartstone
so far, everything has been going pretty okay. I'm completely new. and i have multiplayer working, every player has a working widget system for cards, you can spawn cards on your own field. ( the field has calculations for how the actors get spawned etc) and the field updates like heartstone ( when one card dies it moves to the left etc)
but i dont mind how long this projejct will take, i expect to remake everything 25 times anyway
and eventually i will go into c++, but first i just wanna get into unreal
Turn based is many time easier than action game.
The moment latency is not an issue, the design is many times easier.
Just do everything server side
yeah thats what i'm planning
Starting multiplayer right away isn't a good idea imo, not unless you know OOP.
But at least you are not making competitive shooter or mmo like some blueprint only ppl try to do
yeah i know, but atm i dont have much to do in my life.. so to keep it somewhat interesting i need a challenge i guess
after doing research, i wish i didnt do multiplayer. but too invested xD
What you don’t like doing even basic things twice? 😂
And getting through a really cool concept and realizing other players can’t see said concept 😂
yeah xD
or you need a delay because otherwise something doesnt happen.. fun time when that is your first time
toke me a while to figure that out
Delay shouldn't be a way to solve your issue
Lyra do check every next tick to see if something ready or not tho
what is lyra? 😅
Epic sample project
oh
a delay can sometimes be useful but you really wanna think why your using it
If you are like “oh well I’ll delay the weapons by 1 second and it works” that ain’t it coach XD
yeah, i removed that part already. i couldnt figure out why it was doing something. so i just remade it
daily we go 3 steps back, and one forward
I'm saying it in multiplayer context for the most part just for the note.
I see people using delay to check if something replicate but that's just illusion as you never know the latency. If a player have more than 200 ms then that 1 sec delay check not gonna cut it.
yeah exactly that ain’t good
ahh now i see. how can i do more research on this?
Basically you would want events that do something when it replicates
Reading pins in #multiplayer . Kinda mandatory if you havent
Read it 6 times practice then read some more
oh thanks
Not do something like “request value set, delay 1 second, check value”
Or you could do what the YouTubers do…..check the value on tick then turn a bool off 😂😂😂 (don’t do that)
so bind events to replications?
Mhm for example I have a UI that updates an experience bar
The UI updates on an event that the server triggers
My UI isn’t checking “hey we got any new XP??”
I’ve seen some people check stats on tick. While it technically works it’s better to have a “OnStatChanged” event
for what do you use tick? because so far i havent needed it.
linetrace etc i assume
Anything that you need to run every frame
Check if on air, physics, timer , smoothing stuff, etc
A lot actuallt
To get all actors of class Actor, have a 10s delay and then spawn Niagara systems in all of them
Yep that’s what I do 😂
ahh okay,
anyways. time for me to read some pinned comments. Thanks for everything. i will be back. ❤️
Anything that needs to run often enough to look smooth usually requires tick
Otherwise timers can handle repetitive tasks
Timeline if the length is known imo.
I don't really think timer is a replacement for tick.
If the fps is too low and one tries to use timer with 0.001 sec because they are scared of tick,
They will end up making it worse as the function can be called multiple times within the same frame.
Not only that, but because of how timers work, they're actually slightly less performant than tick as the world timer keeps track of the next time the timer is supposed to fire (using slightly more memory), and the world timer compares the current world time to that time (using slightly more CPU) and only then will it trigger the timer.
Need something done every frame? Use tick. Need it to only happen periodically? Enable and disable tick. Need more than one thing running on tick? Use some branches to drive what happens on tick, and use that same logic to determine if tick should be enabled or disabled.
Does anyone know of a good source for learning about behavior trees (paid or free), I'm having a hard time understanding it and do a lot better when taught how things work rather than just people showing themselves plugging stuff in to do a thing.
It's the only thing I've legit had trouble with 
Ask in #gameplay-ai
Doesn't take that long for me to figure out tho. Just understand and look up on how black board, service and selector work
Sometimes unreal gets into this mode where it won't let me select anything and left clicking / right clicking just moves the camera is this a bug or something I pressed without knowing?
This happens when I'm in the scene in selection mode
No I didn’t mean as a replacement for tick. I meant if the interval rate doesn’t have to be that fast (no smoothness required)
Like if I want something to run every half second or so
Enabling and disabling tick would not fit that scenario
The best resource I’ve found is the pinned BT video in #gameplay-ai
And also Luthage over in that channel - but don’t tell her I said that
I'm trying to play a video on a widget and I have several on this widget. I want a certain video to play based on the cycle the game mode is currently on. Now I have open source node to play said videos and have turned media source and target into array variables that store the file media source and media player. I then get a copy of that array and the value of the cycle form the game mode to determine witch video should play, how ever it keeps saying
Blueprint Runtime Error: "Accessed None trying to read property CallFunc_Array_Get_Item".
Does this mean It wont work if the obj ref comes from an array?
Sounds like your source isn't in the array.
Just starting out today, where should I start to make a multiplayer game on steam ? I have one month in front of me at max. Thank for sharing your ideas!
1 month? Do something else that is not multiplayer.
You won't make any single player game worth releasing in a month either
As someone new, to launch a multiplayer game on steam, and do it well, you're looking at a year of learning and a year or two of development.
So 2-3 years minimum
I mean, in a month you could probably make a multiplayer walking simulator.
If all you do is wander around and maybe read some notes and see your friends.
It will probably take him a month to setup the lobbies and joining, assuming he can work his way around a plugin.
My day 1 I'm absolutely clueless.
As someone who touched mp, I will never recommend starting from that point as you are dealing with multiple instance of the game.
And mp not gonna help a beginner understand OOP
Thx, ill do that
With the right tutorials/plugins you could follow along well enough to get players connecting via the Steam's friends list and getting into a default third person level or a default showcase map from an asset pack.
If you've never made a game its probably going to take a week to setup steam too
You wouldn't have time to build a lobby. lol
Not to mention if you want even the slightest chance of success the page needs to be up for the better part of a year
Walking simulator without sprinting, rip
I mean... technically your coming soon page has to be up for 2 weeks on Steam to even launch a game anyway.
Good luck doing sprinting in bp in multiplayer
I think it's 2 weeks...
It wouldn't be a walking simulator if you could sprint. lol
Then it'd be a sprinting simulator. XD
I guess, I never played more than death stranding
Walking * 2
Not in multiplayer using character movement component
You have to use cpp or have a super shitty input delay if you doing it on server side
Do your self a favour and work on single player game first tbh. That's my opinion anyway with the best intention.
Or 7
I would never tell my old self to do multiplayer day 1 without knowing blueprint coms and OOP
To be honest @trim matrix you're doing yourself and all other indie devs a huge disservice if you launch a game on Steam with < a month of experience making games. You're just going to be making a garbage asset flip/shovelware and contributing to flooding the Steam marketplace.
I'd highly recommend against trying this. Especially if you're interested in making money from it. Cuz you won't. You'll just lose the $100 license fee from Steam.
Tbh, I don't think sense or a good game is the goal, given "walk around with someone else" was an acceptable option
Assuming he can even get it up in 1 month. Most people including my self always underestimate our self
OOP?
Scope and dream game doesn't go along most of the time.
Object oriented programming
😩👍
Get photoshop?
or dont
I don't even know if Ms paint still exist
cause adobe
No need
I used photoshop for that lol
Are you changing the tint in your logic somewhere?
nope
Show the detail panel
That's the only thing I can think of without seeing the logic.
Look thru colors
It's not black in the preview, so it's not set black in the defaults. It'll be some sort of logic.
Z value ?
Ignore the widget and the way it looks like a known infamous male genitalia organ@frosty heron
uh if thats a progress bar....are you setting the percent?
ah you are hmm
any logic that is setting the percent to 0?
well for now yes because it's for testing
sure yeah
Try setting the percent 0.5 to see what it looks like
its already set to 1.0
Ohh
you sure you have no logic thats setting it off 1?
Yeah I mean try to see what it look like on 0.5. Just to see what the underlying color look like
Seems to be in order here
you have a bind to a function get fill color and opacity, whats that look like?
Anyone knows documentation about helldivers's physic shooting combat system? Is it possible to remake it in unreal?
sure its possible
Not in a month
lol
Documentation/source ?
In a year?
Not as a beginner
Not even in forever with blueprint
well you arent gonna find the source
but im sure there is plenty of plugins / articles that can replicate it
unless u're a genius or really capable person I agree
Could you send me some, i have no clue what to search...
Yeah, I don't think anyone just goes around documenting how games mechanics are made very often. You're not gonna find anything technical enough to copy it for your own project.
I would really start with something simpler
start with getting a gun to shoot
or understanding characters / attaching a gun to your hand
If today's seriously your day 1 in Unreal Engine I'd challenge yourself to get a door to swing open and closed when you interact with it.
wdym?
If you can figure that out in your first day without just following a tutorial I'll be impressed. And it'll give you a good idea of how difficult game development actually is when you put that in context of making Helldivers in a month.
I would just like to find more info about the topic
@lost hemlock this, anything odd going on there?
though tbh that should reflect in the preview
Is your background color transparent in the progress bar? Maybe you've got hundreds of them overlayed and they're all at 0% so it's turning black.
its 100% transparent
only 2 of them
2 layers
Oh. It's definitely what Shiny is mentioning. lol
Unless you have a reason to be changing that every frame, then remove it.
You accidentally created a function that's probably returning an empty black color node.
kinda what im wondering yeah
You can check in the Graph section under your functions to see it.
Did you bind it to change the color based on your health percentage?
This
What engine version should I use?
Open the function and show
latest one, might as well
Google it. Use the latest engine version unless you have a reason not to.
yes
I meant google about more info about Helldivers*
also just to put it into perspective
Couldnt find anything
helldivers was like a 7 year dev cycle
Then check the function to make sure you have it set up correctly.
Then there probably isn't anything. What do you want to know, exactly?
Is there a physic system built in unreal that I should use?
Yeah. The one built into unreal.
Chaos is the newest one I believe
I cant create mine..
uhhhhhh
That's why it's black.
Just remove it you don't know what you are doing there
That's the logic to set the percent not the color
So it would work?
Yea which don't make sense
Thx
i would just remove it, you dont want that for setting the bar progress
You're getting a value between 0 and 1. So if your player's health is 0 it'll be black and white if it's 100%. At least that's how I assume a float to linear color conversion would work. lol
thats the physics engine so yeah
But we do, if you don't want to change the bar color, remove the binding all together.
Will ı need to modifiy it in BP?
ok should i remove this entire event graph ?
yeah delete the function, get rid of that binding
Go to your progress bar, make sure to remove the binding there
yes its not a it works out of the box, takes some elbow greese
I was following a tutorial for that
Do this instead
oh my xD
Yeah im just speculating but thats not what you want haha
Umm, i need to modify the engine source from BP for the physic stuff? That seems pretty hard...
you wanna adjust the fill PERCENT not the alpha / color id wager
What sort of special physics do you want that you don't think you can do with the default engine?
physics is not easy, and its even harder in a multiplayer setting
with that being said, chaos is very capable
How do you get an animated pfp? (you can DM me) Ok nvm I jsut read your answer THANKS I didn't know you could that uwu
Well that code above will turn from green to orange depending on the player hp. If you don't want to change the color just remove the binding
Nitro and uploading a gif
Like helldivers
🤷♂️
if you mean the potion around my pfp, thats a border from the discord shop
What about Helldivers do you think is unique? What special physics do they have that you're looking for? @trim matrix ?
I haven't played Helldivers 2, but it seems like a pretty standard shooter to me.
The demolition part
You can do that with built in destruction in Unreal.
Do you have advanced documentation that I could check?
Someone already mention chaos
Complete resources for learning to use Unreal Engine 5
This is why we're recommending you play with the engine first before you start trying to build a AAA game with it. So you can learn how the engine works on a basic level first before you start asking how to code your own physics engine because you don't know what you need to do what you want.
You are not gonna make hell divers anytime soon
The sooner you accept it the better
Nah
K stay delusional then
😘
You gonna spend the entire day wondering what to look at and look for short cuts
For starters you're dividing by 0
But there isn't any
Do you know the risk you just put the universe at?
good point
The simulation will crash out
nah the universe thought of it when creating blueprints for newbs just for this case, it catches it for them
?
this is why blueprints are the best when learning, other wise you will crash the simulation
Hehe try catch exceptions for bad users
Ok thx, ill look it up
It must have used the safe divide node.
like half the code in BP is probably geared towards catching crashes and imploding the universe lol
Crashing is a gift tho, at least we know where we do wrong.
Silent bug is the worse
Lmao
Doing is valid check when you want to ensure that the object is not null will just be counter intuitive imo
Worse when you go to fix them and realize it shouldn't have worked at all to begin with kekw
When ill be at the top, you will no longuer laugh...
Make sure you're plugging the lerp into the right input in the return node, btw. Not sure how you got a second one there.
Who are you
If you drag any noodle onto a return node, and not on a pin, it creates a new output
Nooooooooooooodle 🍜

I didn't think it would let you do that in a widget binding function I guess. But I guess that's why he's getting the wrong number of pins error. lol
Sometimes the engine is too smart for our own good
What documents should I read to modify the engine from source? In bp
If you want to modify the engine from source u'll need #cpp
Yeah. Go ask the guys over there. Be sure to tell them what you're trying to make and the timeframe you're making it in. O.o
Kindred said otherwise
I did no such thing.
yeah... the #cpp people are much nicer than the #blueprint people..
Is there a language barrier? edit: It feels like stuff is getting lost in translation.
cleans glasses yep I did read that right
honestly, if you have room on the block list... well.. if you have room
Ok will ask
Lol I'm usually nice, but when you're delusional and won't listen to several people who try to warn you that day 1 with game development is not the time to modify the source engine to implement a custom physics engine, I can't promise to be helpful any longer.
I think MathewW was joking
It was indeed sarcasm
So am I. 

oh no
Uwu
I was not joking, I was and am very serious
So am I. 
I wonder if all these deluded folk together would ever build something if we put them all together
they would build a design doc
^
Give them a generous 7 years and see how many weeks they give up after
No givup
How many idea guys does it take to program a lightbulb?
thats not gonna fly with my "i made a video game in 1 week" video upload schedule
I’ve suffered through part of one of such videos
Sarcasm right 🤣
oh yeah that was sarcasm, the blocking was not
It summed up to “I paid for all of these assets and plugins, didn’t know how to use them, but managed to hit play and make the thing run”
Lol
and "run" was a very generous term xD
Bro blocked me? I want to know how to copy them
are you really MathewW? If so I learned everything by just watching ur vids when I needed hepp. tanks uwu
Basically, the 3rd person template character was moving
oy...
I never hang out in here, I'm just following the trainwreck
Lol
.... honestly... more than I should
MOOD
sometimes its just honest newbiness, othertimes it's... something to do
is the debris spread among other channels? I didn't realize it was that seroius.
yeah general, bp, and now cpp, and multiplayer I think?
Lol
I mean it usually starts in hell #ue5-general
I was feeling really guilty for not getting any work done, but now I'm just glad I'm not alone.
My eyes needed a break from coding tbh
yeah im just watching silly youtube videos and doing research soooo this is a nice break
Why wouldnt you help me?
because we can't
^
there are a ton of people who try and help when they can, this is not that time
I need to make my own research, you are right, tjx
It's like trying to help the kid in the sandbox trying to dig to China.
So you can make progress, but the best you'll actually be able to do is just scratch the surface? 😄
You could try tagging Flow over in #industry-chat , he also suffers such delusions
Yeah. Or dig into the septic system.
We should really start selling shovels
Whats that?
That is where your poop goes if you live in a rural area
good ole septic that needs to be drained every decade or so.
Tad off topic tho
Why is my screenspace widget not respecting the size box it's wrapped in? (Look! Someone needs help!)
sarcasm?
Lol no I really can't figure out why it won't work. XD