err... or something like that.. lolz
This thing is hard to explain for me since im not english speaking...
so dont send me to hell if you dont understand a ****.
I have much markers in my C&H mission, i need to make them change color often
(one marker may be red, then green, then switch again to red etc.),
so i tought (yes sometimes it happens to me that i think, woah) it would be good
to not create every time a single script for changing color to one specific marker,
but to create one singular script that can handle 'em all, and since its a C&H,
i tought to implement this thing in the already existent Capture.sqs.
Now i doo this like that,
the only thing i need to change every time is in the line that calls the script,
i make an example:
If marker's name is obj2 and sector is taken by west, script launch in the init field of the trigger would be like that:
[flag2,WEST,"West now controls flag2!",obj2] exec "Capture.sqs"
If marker's name is obj5 and east has conquered the sector:
[flag5,EAST,"East now controls flag5!",obj5] exec "Capture.sqs"
Now to the Capture.sqs, it looks like that:
_flag = _this select 0
_side = _this select 1
_msg = _this select 2
_mark = _this select 3
?(_side == WEST): goto "West"
?(_side == EAST): goto "East"
exit
#West
?!(local Server): goto "Westclient"
WestScore = WestScore + 1
WestArray = WestArray + [_flag]
EastArray = EastArray - [_flag]
PublicVariable "WestScore"
#Westclient
(flagOwner _flag) setflagowner objNull
_flag setflagowner objNull
~0.2
_flag setflagtexture "usa_vlajka.pac"
_flag setflagside WEST
titleText [_msg, "PLAIN"]
"_mark" setMarkerColor "ColorGreen"
goto "end"
#East
?!(local Server): goto "Eastclient"
EastScore = EastScore + 1
EastArray = EastArray + [_flag]
WestArray = WestArray - [_flag]
PublicVariable "EastScore"
#Eastclient
(flagOwner _flag) setflagowner objNull
_flag setflagowner objNull
~0.2
_flag setflagtexture "rus_vlajka.pac"
_flag setflagside EAST
titleText [_msg, "PLAIN"]
"_mark" setMarkerColor "ColorRed"
goto "end"
#end
?(local Server): [_flag, _side] exec "control.sqs"
~1.5
hint format["West: %1\nEast: %2", WestScore, EastScore]
Exit
Now, titletext is displaying, the flags texture changes correctly,
all works fine, all except the marker color change, it does not change...
what the heck i do wrong here?! :help: