How to increase spawn rate for every X killed enemies?

TonyuTonyu Member Posts: 21
edited October 2014 in Working with GS (PC)

Hi again, new guy here. I wanted to make enemies spawn every 1 second and their spawn rate increases every 10 enemies killed until it's impossible for the player to kill the sheer amount of enemies spawned before they kill the player. After reading a few tutorial posts, including the one about custom timers, all I've been able to do so far:

Attributes:
mod1 = 0.05
killcount = 0
spawnduration = 1

Spawner Rules:
if game.mod1 > self.time%game.spawnduration
do spawn actor enemy

Enemy Death Rules:
destroy this enemy
change attribute game.killcount to game.killcount+1
change game.spawnduration to game.spawnduration-.1

Score Rules:
display game.killcount

Unfortunately all this does is increase the spawn rate for every 1 killed enemy, and eventually would stop spawning enemies since game.spawnduration would eventually reach 0.

Help please? Also is it advisable to have spawn rates increase indefinitely? Thanks in advanced

Sign In or Register to comment.