Join us at the Oolite Anniversary Party -- London, 7th July 2024, 1pm
More details in this thread.

Alien technology - a new weapon?

An area for discussing new ideas and additions to Oolite.

Moderators: winston, another_commander

User avatar
Arexack_Heretic
Dangerous Subversive Element
Dangerous Subversive Element
Posts: 1876
Joined: Tue Jun 07, 2005 7:32 pm
Location: [%H] = Earth surface, Lattitude 52°10'58.19"N, longtitude 4°30'0.25"E.
Contact:

Post 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.
Riding the Rocket!
Post Reply