There are, but that really should be fixed. Any of the functions should be actor specific, the reason I had to come up with this particular workaround is because getAnimName isn't actor specific. Anyways... use an activation event. If you didn't know, these are extremely useful. Send the activation event to the actor you want to have its timer destroyed, and it will do it. The trick though is setting a variable of the actor you are sending the event to, so it knows how to act. For example, if you have two timers, and would like to destroy either one, depending on the situation, have a variable activateType.
- Code: Select all
activateType=1; // destroy timer1
SendActivationEvent("actor");
actor -> Activation Event -> Script Editor
- Code: Select all
switch(activateType)
{
case 1:
DestroyTimer("timer1");
break;
case 2:
DestroyTimer("timer2");
break;
}
activateType=0;