# GetActTime

Objects
Activity
5.1 OC
int
Returns the time (in frames) that the object is already executing this same action.
private func Fusing() { // Countdown (~10 seconds) Message("@%d",(370-GetActTime())/37); // if GetActTime is a multiple of 37 (=every 37 frames do...) if(!GetActTime()%37) { // Sound "tick" if the count is even, "tack" if it is odd if(!(GetActTime()/37%2)) Sound("Tick"); else Sound("Tack"); } // Explosion if(GetActTime() > 370) Explode(80); }
This could be the callback for the StartCall of a bomb's "Fuse" action. If the action goes on for less than 370 frames, only a countdown message is displayed and a sound played. If 370 or more frames have passed, the bomb explodes.
GetAction
GetActionTarget
GetPhase
SetAction
SetPhase
Günther
2002-04