Home   Help Search Login Register  

Author Topic: C&H Res Side Problems  (Read 1229 times)

0 Members and 1 Guest are viewing this topic.

ocnick

  • Guest
C&H Res Side Problems
« on: 13 Oct 2004, 23:21:40 »
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:
Code: [Select]
_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:
Code: [Select]
_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.

AK-Chester

  • Guest
Re:C&H Res Side Problems
« Reply #1 on: 18 Oct 2004, 19:45:42 »
Have you tried using "GUER" instead of "Resistance" or "Guerrila"?
« Last Edit: 18 Oct 2004, 19:46:40 by AK-Chester »

ocnick

  • Guest
Re:C&H Res Side Problems
« Reply #2 on: 21 Oct 2004, 22:50:23 »
Yeah I've tried that too, so now I'm thinking that in game mission editor uses one word, and scripts another??  What's the deal here.  I'm baffled.

AK-Chester

  • Guest
Re:C&H Res Side Problems
« Reply #3 on: 25 Oct 2004, 02:09:29 »
side (of unit): GUER
flagSide: Resistance

?

Strango

  • Guest
Re:C&H Res Side Problems
« Reply #4 on: 08 Nov 2004, 15:57:49 »
It's been a while since I used that script, but somewhere in the template he sets the flagside of the flag to be resistance because in his example the two teams are West and East.  So resistance is a neutral party.

For your case you'll need to set the intial flagside of the flag to West since it will be the neutral party in your example.

Since the flag is still being set to resistance, when you try to grab the flag as resistance it won't let you because the flag is already the same side as your team.
« Last Edit: 08 Nov 2004, 15:59:00 by Strango »