Page 4 of 4

Posted: Wed Jun 13, 2007 8:51 am
by Arexack_Heretic
hmmm...yes

update is run only when the AI gets time to do it ...dunno which mechanism would be more robust.
a- resetting the state after each itteration, or
b- updating the script.

Code: Select all

GLOBAL {ENTER = ("setStateTo: PULSE"); UPDATE = (); EXIT = ();}; 
PULSE = {
ENTER = ("pauseAI: 5");
UPDATE = (scanForHostiles, "pauseAI: 3");
"TARGET_FOUND" = (performHyperspaceExit, "pauseAI: 2");
"NOTHING_FOUND" = ("pauseAI: 2", becomeExplosion)
EXIT = ();};
like this.
I added the pause at enter to prevent the device from triggering too soon after launch.