Triggers on Start, by Sluggs (21-09-05)
Updated: 03-12-05

Here's another alternative to Nameless Voice's "Triggers on Load"
tutorial.

1) Create a Lever and set it's JointStates to:

   AnimS = On
   Joint1AnimS = On

2) Create a DestroyTrap and link the lever to this.

3) Create an AI in a BlueRoom, (a small room away from the main
   mission), and link the destroytrap to this.

4) Add the script "TrigBrainDead" (Gen.osm) to the AI.

5) Link the AI to whatever needs activating on every mission start.

"What happens here then?"

AI's have two sphere's. When KO'd or Killed, these sphere's vanish
when the AI's death sequence has completed, (you can see this in action
by whacking an AI with the "Show_Phys_Models" command set), this is
where the script "TrigBrainDead" comes in. This script can be used to
control something when the sphere's vanish. The sphere's come back
again when the player picks up the AI then drops it but the script will
not work again.

"So how can we control something on each mission start?"

No need, the game does that for you! When you reload the mission, the
dead AI suddenly has it's sphere's returned for a second, thus
controlling whatever, again, each load, without fail!

Note: If you use this script on AI's that get teleported, place them
inside the solid void, instead of an airbrush, otherwise they will
trigger whatever they are linked to upon teleportation. (They
temporarily lose their spheres when teleported!)