Difficulty Progression Help
by Andrew Nare · in Torque Game Builder · 01/31/2009 (4:45 pm) · 2 replies
I've been trying to add progressive difficulty to my game by increasing the spawn rate of an object every minute or so. I'm not familiar with TorqueScript so I don't know how I could do something such as this.
If anyone has any ideas on how I can increase the spawn rate of an object at set intervals of time I'd really appreciate the help.
If anyone has any ideas on how I can increase the spawn rate of an object at set intervals of time I'd really appreciate the help.
About the author
Leadwerks
Torque Owner Steven Hine
function Spawner::IncreaseRate(%this, %newVal) { %this.spawnRate += %newVal; %this.scheduledRate = %this.schedule(30000, 0, "IncreaseRate", "5"); }Just call it once when needed. End the scheduled event by using 'cancel':function Spawner::StopRateIncrease(%this) { cancel(%this.scheduledRate); }