I'm making a C&H mission on Tonal using the Gov. and Rebel soldiers. I used Backoff's C&H tutorial as a template for it, but I ran into problems when substituting the Gov. (Resistance) side for the WEST side.
The scripts don't work when I take a flag with a Gov. soldier (Resistance), yet they work perfectly fine with a Rebel soldier (EAST).
Here's 1 of my Trigger condition/activations:
Condition: (Side (FlagOwner Flag1) == Resistance)
Activation: [Flag1] exec "CaptureFlag.sqs"
which then activates this script:
_flag = _this select 0
_player = flagOwner _flag
?(_flag == Flag1): _msg = "Flag 1"
?(_flag == Flag2): _msg = "Flag 2"
?(_flag == Flag3): _msg = "Flag 3"
?(_flag == Flag4): _msg = "Flag 4"
_player addscore 5
goto format ["%1", side _player]
goto "end"
#Resistance
ResistanceFlag = ResistanceFlag + [_flag]
EastFlag = EastFlag - [_flag]
PublicVariable "ResistanceFlag"
PublicVariable "EastFlag"
~0.5
(flagOwner _flag) setflagowner _flag
_flag setflagowner _flag
~0.5
_flag setflagtexture "usa_vlajka.pac"
_flag setflagside Resistance
?(_flag == Flag1): "mFlag1" setMarkerColor "ColorBLUE"
?(_flag == Flag2): "mFlag2" setMarkerColor "ColorBLUE"
?(_flag == Flag3): "mFlag3" setMarkerColor "ColorBLUE"
?(_flag == Flag4): "mFlag4" setMarkerColor "ColorBLUE"
titletext [format["Government forces capture %1", _msg], "PLAIN DOWN"]
goto "end"
#East
EastFlag = EastFlag + [_flag]
ResistanceFlag = ResistanceFlag - [_flag]
PublicVariable "ResistanceFlag"
PublicVariable "EastFlag"
~0.5
(flagOwner _flag) setflagowner _flag
_flag setflagowner _flag
~0.5
_flag setflagtexture "rus_vlajka.pac"
_flag setflagside East
?(_flag == Flag1): "mFlag1" setMarkerColor "ColorRED"
?(_flag == Flag2): "mFlag2" setMarkerColor "ColorRED"
?(_flag == Flag3): "mFlag3" setMarkerColor "ColorRED"
?(_flag == Flag4): "mFlag4" setMarkerColor "ColorRED"
titletext [format["Rebel forces capture %1", _msg], "PLAIN DOWN"]
goto "end"
#end
[_flag, side _player] exec "control.sqs"
Exit
which then activates this script:
_flag = _this select 0
_side = _this select 1
_count = 0
#start
~1
?(_side == Resistance): _ar = ResistanceFlag
?(_side == East): _ar = EastFlag
?!(_flag in _ar): goto "end"
_count = _count + 1
?(_count == 30): goto "score"
goto "start"
#score
?(_side == Resistance): ResistanceScore = ResistanceScore + 1
?(_side == East): EastScore = EastScore + 1
PublicVariable "ResistanceScore"
PublicVariable "EastScore"
_count = 0
goto "start"
"end"
Exit
I'm not sure when to use "Resistance" or "Guerrila" as a side, because I've seen both used, and I've used both in the scripts. But, neither worked and it has been driving me nuts.
If anyone has any ideas, I'd like to hear them ;D. And if you want, I can attach the mission folder, so you can see what I'm working with.