How to get random spawner and only spawn if in range?

Regarding me insulting the Level Blueprint - I exaggerate, it sure has its uses. You can use it as a manager if this level has some unique functionality.

If I wanted to choose a random spawner and have it create a monster regardless of the player being close by:

  • a new Custom Event in the Spawner blueprint hooked up to the same nodes as its timer

  • get the Spawner references:

Image from Gyazo

  • this makes the array of Spawner actors, starts a Timer and makes it pick one spawner at random
  • we then call the custom event mentioned above

  • now the spawners work even if the player is away
  • and if we step into the spawner sphere, both timer will run - the one in the spawner and the one in the level blueprint

Image from Gyazo

Hope this helps.

1 Like