How do I use the random function properly?

Seem to be having trouble with this, I'm wanting to spawn an actor at random intervals instead of being in a timer and it just spawning the actor every 3 seconds or what not, could someone kindly explain how I can do this?

Kind Regards

John

Comments

  • BoomshackBarryBoomshackBarry Member Posts: 712
    I think this might be what you're after:

    http://forums.gamesalad.com/discussion/47866/timer-with-random-every-time

    I can't check it myself as I'm at work but it sounds like what you're looking for.
  • CoolBeeCoolBee Member Posts: 81
    Thanks Boom I'll check it out soon!
  • JfranJfran Member Posts: 10
    Timer: Every random (minimum time between actor spawning, maximum time between action spawning) no units for example -- *Timer* Every (random (3,5)) *Spawn Actor*
  • HopscotchHopscotch Member, PRO Posts: 2,782
    edited June 2013
    @Jfran, that wont work. All it will do is start the timer with a random interval and then keep spawning at that fixed interval.

    @CoolBee, the above link from BoomshackBarry is one way to do it.

  • HopscotchHopscotch Member, PRO Posts: 2,782
    Attached is a shorter more contained version of the random spawn timer with the ability to set an initial delay.

    There are two game attributes to set the earliest and latest spawn time.
Sign In or Register to comment.