I'm currently modifying a CTF mission that came out of the Mission Wizard. The first thing I'm trying to do is assign the flag to the player that gets near the pole. This way, I don't have to deal with the "Take Flag" action; the flag will just pop up on their back and be done with it.
It works but with a delay. The delay is because the flag still has to go down the pole. I moved the zone away from the flag I am trying to capture, but within sight of the flag. When I enter it, I can watch the flag sag down the pole.
Here's how the flag is defined:
class Item0
{
position[]={7121.313965,105.461426,8955.625000};
id=1;
side="EMPTY";
vehicle="FlagCarrier";
skill=0.200000;
text="east_flag";
init="this setflagtexture ""rus_vlajka.pac""; this setflagside east";
};
Here's the trigger:
class Item18
{
position[]={7133.433594,105.687920,8969.040039};
repeating=1;
a=2.000000;
b=2.000000;
activationBy="WEST";
type="SWITCH";
age="UNKNOWN";
text="Give_East_Flag";
expActiv="east_flag SetFlagOwner (thisList select 0)";
class Effects
{
};
};
Note that I don't have any conditions on that trigger yet, but I know I need to eventually check the flag before haphazardly giving it to whomever walks into that zone. For single-player sanity testing this seems all right.
I haven't screwed with any of the other objects from the generated mission, other than positioning them more accurately.