Trigger Flags
Final version updated with MyLevel package - 15th December 2002


Miles Asvachin


A small addition to the standard CTF flags, triggering an event when the flag is taken, and un-triggering it when the flag is returned.



Put the following file in the indicated directory:

A) TriggerFlags.u        ->        UT2003\System


B) MyLevel.u        ->        UT2003\System



A) Open the package 'TriggerFlags.u' in UEd, then instead of adding xBlueFlagBase/xRedFlagBase, add their subclasses, BlueTriggerFlagBase/RedTriggerFlagBase. If you use this method you must distribute 'TriggerFlags.u' with your map.


B) Open 'MyLevel.u', then open your map and place the flags as above. Save the map and delete 'MyLevel.u' from the System directory. Now the code is embedded in the map so you don't have to distribute the package. n.b you must have a copy of both flags in the map when you save, or the code will not be saved with the map.

The Event to be triggered is in their properties under Events->FlagTakenEvent (not the normal Event field).



To have, for instance, a door that closes when someone takes up the flag and closes when it is returned, set the mover's property Object->InitialState to 'TriggerControl' and set key 0 to the open position and key 1 to closed.

The Events->Event in the flag properties is triggered when the flag is captured. This is normal flag behaviour, not something I have added.


Known bugs: