function Bomb::onCollision (%this){
echo("The bomb will go off in 60 seconds");
%this.schedule(60000, "explode"); // 60,000 ms
}
function Bomb::explode(%this){
// explode code goes here
}
The functions may need additional parameters for datablock-object pairs ( like %this, %obj ), I'm not entirely sure.
Note: the schedule function is not guarunteed to be totally accurate, so it may not be exactly 60 seconds, but it will be close.
You could also incrementally schedule a ticking function for 1 second intervals (60 times) and sending ui updates to the player for feedback.
Torque Owner Jason MacWilliams
function Bomb::onCollision (%this){ echo("The bomb will go off in 60 seconds"); %this.schedule(60000, "explode"); // 60,000 ms } function Bomb::explode(%this){ // explode code goes here }The functions may need additional parameters for datablock-object pairs ( like %this, %obj ), I'm not entirely sure.
Note: the schedule function is not guarunteed to be totally accurate, so it may not be exactly 60 seconds, but it will be close.
You could also incrementally schedule a ticking function for 1 second intervals (60 times) and sending ui updates to the player for feedback.