#This return node on spawn actor for
1 messages · Page 1 of 1 (latest)
OK, but my actors arent spawned through spawn actor, they are placed in the world ahead of time manually.
Im not that good at unreal but i would make a system to spawn them or you would need to sort through all objects in vicinity i guess.
Not really sure what the best approach is.
Oh actually
There is a "get all actors of class" node.
You could use that to get all of a specific enemy
but then how do I differentiate between them? like if I have Bob1 and Bob2 at opposite ends of the map, but Bob1 has lost half his health, how do I assign that lost half health specifically to Bob1 on load?
Even better:
You use this reference when saving them by going through each actor with a "for each"
And on load you just go through the struct list and spawn actor of that specific class and change their stats.
If your actor implements a component for their stats its very easy to access and change after spawning them.
For example here I have my generic damage system component.
Ok, but lets say I have an actor that I placed at a position.
On save that actors information, including their position, is saved.
Now when I load, it spawn an actor with the correct stats at that location.
Would there not now be 2 actors stacked on top of each other? The one I placed and the one spawned with the correct stats?
I can pass any actor reference to it and if that actor has the component i can deal damage to it.
I could do that when spawning it.
Im not sure about how that works.
I havent played around with saving myself.
But I remember asking about it at some point and structs were the answer I got.
I'll refine my question and repost then, thanks for the help though.