Little issue with timers

steve86steve86 Member Posts: 806
edited November -1 in Working with GS (Mac)
Hello

I'm trying to make a game in which enemies will spawn to the screen and depending on the score (you get score by killing enemies) or the time that passes the spawn rate will increase and the enemies will spawn faster.

the way I tried to accomplish this is I made an attribute called spawnrate. and then made a rule that every 30 seconds spawnrate will decrement. and made another timer that "every spawnrate seconds" the enemy will appear on screen.

But for some reason the attribute spawnrate doesn't update in the timer. It does decrement with the rule I created, but the enemies keep spawning at the same rate as the beginning

any ideas what is going on? or do you know a way to achieve this using a different method?

thanks a lot

steve

Comments

  • steve86steve86 Member Posts: 806
    just found a great demo by codemonkey on how to achieve this..

    thanks codemonkey
  • Rob2Rob2 Member Posts: 2,402
    Scitunes had a good solution too http://gamesalad.com/forums/topic.php?id=19104 with his "timer with variable rate" project can you post the codemonkey link please :)
  • steve86steve86 Member Posts: 806
    thank you rob that is also a good solution..

    to find codemonkeys demo search for "Increasing Spawne(Demo)" inside the gamesalad creator in the plus sign tab.. and you can find it there
  • Rob2Rob2 Member Posts: 2,402
    thanks very much :)
Sign In or Register to comment.