Flag Change/Zone Captured script
This is a revised version of the original script.
The flag now starts out with a neutral texture and can be captured by either side on multiple occasions from the outset of the mission.
It is a script that triggers upon an area being captured and changes the flag to that of the capturing team. In addition, the zone colour on the map changes to reflect the controlling team - thanks to Wedge for this feature (see below).
These flag change/zone captured triggers are activated using the seizedBy trigger.
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.
This script also allows the flag's textures to change back and forth as the different sides get control of the zones.
You can down load a zip file with a simple mission from here. The mission contains four zones that can be captured.
For four zones/flags, as in the example mission, you’ll need to copy all five folders into your mission directory as well as the info contained in the description.ext and the init.sqf file. In addition, you’ll need to add eight triggers (two for each zone/flag ie. one for west and one for east for each flag) and copy across the trigger expCond, expActiv as written in the mission.sqm. Next add four flags named flag_E1 to flag_E4 and eight markers to define sector flags and sector regions – once again use the accompanying mission as a guide.
The system uses HAILO’s onplayerConnected script to give a joining player the current flag and zone states and the flag change scripts have now been rewritten in sqf format.
Mission.sqm (contains triggers that activate the flag_capture.sqs)
Init.sqf (runs mission_start.sqs that defines the global variables and gets the variables for joining players and HAILO’s JIP script)
description.ext (defines sounds)
There are also five folders that contain scripts needed for the flag change, these folders are:
Flag_capture, flags, scripts, sounds and events.
Game Version tested on 1.05.
Tested on a dedicated server with multiple players and works with JIP.
Special thanks to Wedge from IC-ArmA, www.ic-arma.com, for writing the demo mission, adding the zone capture markers and pushing me to get this finished