Spawning An Actor 'X' Amount of Times Based On Integer?
SikkJewFro
Member Posts: 75
Ok, so maybe I am completely derping out here, but is there any way to spawn several of one actor without having to add mulitple "Spawn Actor" Behaviors? My game will eventually allow players to change how many items spawn per 1 second, so how can I make it so that by default, it spawns 4 of said actor, then in the future can be changed to a higher value?
Comments
In your spawner actor make an attribute . . . . let's call it XXX - And let's say we want to spawn 17 actors.
. . . . . . . . . . . . . . . . . . . .
If you are working with the Macintosh version you could use a Loop Behavior to do it. I don't think the Windows version offers that behavior yet, but I could be wrong.
Using the Loop Behavior you could:
Set up a Game Level Integer Attribute called Spawn, set it's default value to 4
Create a game controller actor to act as the spawner and add a Loop Behavior set up like this:
http://jamie-cross.net/posts/ ✮ Udemy: Introduction to Mobile Games Development ✮ Learn Mobile Game Development in One Day Using Gamesalad ✮ My Patreon Page
Thanks @Socks got exactly what I was looking for!