I'm looking at some existing CTF missions in order to figure out the basic components when scripting a CTF mission. For now, I'm trying to just capture a flag and return it. I have my flags in place, and I can get them, but:
1. There is no notifcation that I captured a flag.
2. Bringing the flag to my base at the given coordinates doesn't cause a score.
There are some tutorials in the vein of CTF, but they seem to only be for one-side CTF -- one team has a flag that has to be captured but the other doesn't.
So first off, what might I be missing?
class Sensors
{
items=5;
class Item0
{
position[]={7122.139648,105.502586,8957.613281};
a=500.000000;
b=500.000000;
activationBy="WEST";
age="UNKNOWN";
class Effects
{
sound="Rus4";
track="7thLifeless";
};
};
class Item1
{
position[]={2609.912598,1.352212,2248.935791};
a=0.000000;
b=0.000000;
repeating=1;
type="SWITCH";
age="UNKNOWN";
text="RusMajiVlajku SW";
expCond="not isnull flagowner vlajkaUSA and flagowner vlajkaUSA != ownerU";
expActiv="ownerU = flagowner vlajkaUSA; titletext[format [localize ""STRD_17"", name ownerU], ""Plain down""]; PrycU=true";
class Effects
{
sound="RCapture";
};
};
class Item2
{
position[]={2582.933594,1.352212,2248.451416};
a=0.000000;
b=0.000000;
repeating=1;
type="SWITCH";
age="UNKNOWN";
text="AmerMaji SW";
expCond="not isnull flagowner vlajkaRus and flagowner vlajkaRus != ownerR";
expActiv="ownerR = flagowner vlajkaRus; titletext[format [localize ""STRD_16"", name ownerR], ""Plain down""]; PrycR=true";
class Effects
{
sound="UCapture";
};
};
class Item3
{
position[]={3875.737793,22.589998,8263.318359};
a=0.000000;
b=0.000000;
repeating=1;
type="SWITCH";
age="UNKNOWN";
text="NosicTu SW";
expCond="(OwnerR in list NavratW) and not PrycU and not Konec";
expActiv="Kdo=OwnerR; OwnerR=objNull; vlajkaRus setFlagOwner objNull; UScoreP=UScoreP+1; titletext[format [localize ""STRD_15"", UScoreP, RScoreP], ""Plain down""]; PrycR=false; Kdo addScore 5; ""_x addScore 5"" forEach units group Kdo";
class Effects
{
sound="UScore";
titleEffect="PLAIN DOWN";
};
};
class Item4
{
position[]={7152.262207,105.344994,8981.521484};
a=0.000000;
b=0.000000;
repeating=1;
type="SWITCH";
age="UNKNOWN";
text="NosicTu SW";
expCond="(OwnerU in list NavratE) and not PrycR and not Konec";
expActiv="Kdo=OwnerU; OwnerU=objNull; vlajkaUSA setFlagOwner objNull; RScoreP=RScoreP+1; titletext[format [localize ""STRD_14"", UScoreP, RScoreP], ""Plain down""]; PrycU=false; ""_x addScore 5"" forEach units group Kdo";
class Effects
{
sound="RScore";
titleEffect="PLAIN DOWN";
};
};
};
The positions are in St. Louis and Larche on Malden, right where I want them to be. They are the coordinates to the flag poles. I've tried making the score triggers have a span of 5 meters around, but it didn't help any. Where am I going wrong?
Also, if there is a tutorial for CTF like this with some well-commented code, I'd be content in digging through that instead.