Timer Decrement

daramcdaramc Member Posts: 3
edited August 2012 in Working with GS (Mac)
Hi All!!

I'm trying to create a timer decrement spawner that will start spawning an actor every 2 seconds, but that every 10 seconds of game play the spawner will have 0.2 of a second removed from its Rate of Spawning. So over the course of the game, actors will be spawning quicker.

(Game Time - Rate of Spawning)
0 - 9.99s - every 2 seconds spawn an actor
10- 19.99s - every 1.8 seconds spawn an actor
20- 29.99s - every 1.6 seconds spawn an actor ...........etc

until it gets to (Rate of Spawning) every 0.2 seconds and it will just stay at that speed until the game is over.

I've seen questions similar to this in a few previous threads but they were targeted towards - Rate of Spawn:(is to) How many points received or actors destroyed. I've looked at these for help and tips but I cant seem to figure out how to get a decrement of any seconds to work.

Any help would be most appreciated

Cheers

Comments

  • daramcdaramc Member Posts: 3
    Hi uptimistik!

    Thanks for leaving the post!

    I tried your code and am getting the same problem I had myself. The spawner is spawning an actor every 2 seconds but its not getting any faster. It just stays spawning an actor at every 2 second.

    I just want to double check with you that - spawnTimer that you mention on every line is the actors attribute (self.spawnTimer) and not a game attribute at certain parts.
    Do the two Timer behaviours need to have the (Run to completion) box ticked or to be left alone?

    Thanks
  • daramcdaramc Member Posts: 3
    Thanks a million for that uptimistik, really appreciate it!! Works exactly how I was hoping it would.

    i could follow it except for the first rule in the spawner. The Attribute "self.mod1 > self.Time%self.spawnTimer" part.
  • daramcdaramc Member Posts: 3
    Thanks
Sign In or Register to comment.