I’m trying to set up a system where, after an actor gets destroyed (like when its health reaches zero), a new instance of that actor is spawned at a random location inside a defined area or volume in the level.
How can I do this in Blueprint?
How can I do this in Blueprint?
Easiest is to, instead of “Destroy Actor,” simply call “set actor position” to the random location you want, and also set the hitpoints back to full.
Another option is to make a blueprint for an “actor spawner” that is a volume of some sort, and then use a random point in that volume as the destination. Simply find the spawner using “find all actors of type” and get the first element of the array that returns.
Here’s a youtube video that seems to do something similar, too: https://www.youtube.com/watch?v=qZ664071t-M