Flag Change/Zone Captured script. As I posted on the BI forums the triggers that activate this script may now be a little redundant thanks to the new "seized By" trigger but the triggers are based on a slightly different concept and the flag change script will still be useful for some map makers out there.
Demo missionYou can down load a simple mission from
hereMission ContentsMission.sqm (contains triggers that activate the flag_capture.sqs)
Init.sqs (defines the global variables via mission_start.sqs)
mission_start.sqs (defines the variables once at the start of the mission then JIP players receive the current state of the global variable at the moment they join mission)
flag_capture.sqs (changes the textures of the captured flag to that of the capturing side)
Description of ScriptsIt is a script that triggers upon an area being captured and changes the flag to that of the capturing team.
These flag change/zone captured triggers are activated after a team has been in a zone for a certain amount of time without an enemy unit entering that zone during that period. It takes a few seconds for the flag to change after the zone is captured.
These areas and times can be adjusted within the trigger. Currently set to 5 secs capture time (for the sake of testing - probably want this set to at least 20 or 30 seconds for match play) and capturing distance set to 20 and the no enemy units radius also set to 20 (look in the conditions line of the trigger to change this).
For the sake of testing the triggers at each flag are slightly offset so you can find them in the example mission but you'd want to superimpose them directly on top of each other in your missions.
The mission can be played as either BLUFOR or OPFOR (both without weapons for testing purposes) but you'll need to play as BLUFOR to get the initial flag change as flags are currently set to Russian textures.
This script also allows the flag's textures to change back and forth as the different sides get control of the zones.
Really designed for testing using the method described
hereGame Version tested on1.05. Tested on a dedicated server with multiple players and works with JIP.
Known BugsSome players, who join after the mission has commenced, do not get the on screen text prompts to say a flag is changing even though it does change. Any one with suggestions on how to fix this please let me know.
Future developmentsIf requested I can update the mission using the new seized by trigger and if people are interested I could make the flag neutral to start with so that both sides could capture the flags from the outset. I could also delete the hints that pop up while the script is running.
Spooner 2007-11-04: Delayed due to broken link to demo. Should the author wish to re-attach/re-link the files, then this resource will be tested for submission.