I’m trying to hide team_CTF_redflag / team_CTF_blueflags. I want the illusion that both teams can pick this objective up and capture it, so naturally I inserted two flags for each team. When one team picks up a flag it makes the other flag that the other team can pickup invisible. If the taken flag was returned the other flag would return to default and be visible.
So far I’ve tried simple setstates referring to the scriptname of the flags. However, that did not work, the states wouldn’t change. I tried giving the flags a targetname for the setstates to refer to, but either the flag is going invisible right away and won’t change states or its breaking the flags all together (I can’t tell which). I thought perhaps the setstate that makes the flags invisible in the stolen block was somehow being accessed right away, I tried to circumvent by using a trigger which lead to no success.
I’m not sure what I’m doing wrong… Gerbil insists its possible… so if anyone can point out where I’m messing up, that would be great.
"targetname" "axis_gold"
"scriptname" "axis_gold"
"classname" "team_CTF_redflag"
"origin" "-3328 7800 1040"
"message" "the Gold"
"model" "models/mapobjects/goldbox_sd/goldbox.md3"
"skin" "models/mapobjects/goldbox_sd/goldbox.tga"
"targetname" "allied_gold"
"skin" "models/mapobjects/goldbox_sd/goldbox.tga"
"model" "models/mapobjects/goldbox_sd/goldbox.md3"
"message" "the Gold"
"origin" "-3328 7672 1040"
"classname" "team_CTF_blueflag"
"scriptname" "allied_gold"
Here are several attempts I tried:
allied_gold
{
spawn
{
wait 200
setstate allied_gold_captured invisible
setstate axis_gold default
}
trigger stolen
{
wm_announce "The Axis have stolen the Allied gold"
setstate allied_gold_cm_marker invisible
trigger hide
}
trigger returned
{
wm_announce "The Allies have retrieved the gold"
setstate allied_gold_cm_marker default
setstate axis_gold default
}
trigger captured
{
wm_announce "The Axis have secured the Allied gold"
setstate allied_gold_red invisible
setstate allied_gold_captured default
setstate axis_gold invisible
}
trigger hide
{
setstate axis_gold invisible
}
}
axis_gold
{
spawn
{
wait 200
setstate axis_gold_captured invisible
setstate allied_gold default
}
trigger stolen
{
wm_announce "The Axis have stolen the Allied gold"
setstate axis_gold_cm_marker invisible
setstate allied_gold invisible
}
trigger returned
{
wm_announce "The Allies have retrieved the gold"
setstate axis_gold_cm_marker default
setstate allied_gold invisible
}
trigger captured
{
wm_announce "The Axis have secured the Allied gold"
setstate axis_gold_red invisible
setstate axis_gold_captured default
setstate allied_gold invisible
}
}