Spawn actors at random intervals
I'm trying to spawn actors at random intervals, as the topic title implies. How would I go about that? I tried using every random seconds spawn but that doesn't randomize the seconds at all. Tried using an Attribute and randomize that every set seconds and then use that randomizing Attribute as the random interval to spawn by. Didn't seem to work either. I'm at a loss. Any help is much appreciated.
Comments
First Create a game attribute called spawn
Then two rules Rules
When game.spawn = 0
--Spawn Actor
--Timer After Random(1,5)
----ChangeAttribute game.spawn to (game.spawn+1)%2
Otherwise
When game.spawn = 1
--Spawn Actor
--Timer After Random(1,5)
----ChangeAttribute game.spawn to (game.spawn+1)%2
That should give you a constant random spawn every 1 to 5 seconds.
I haven't tested it but I think that should be right.
Edit: TSB beat me to a response I guess. Let us know if either worked.
___________________________________________________________________________________
Project Help from Tenrdrmer Click Here
GS BubbleBall Template HERE!!
Stacks Level Selection Template HERE!!
Expanding Option Menu Template HERE!!
Tenrdrmer's Menu # 3 HERE!!
Menu #4 - Level Banners HERE!!
AppSolute Entertainment on Facebook
AppSolute Entertainment on iTunes