Jump to content
Sign in to follow this  
Noodles067

Returnning a flag; it wont work

Recommended Posts

Hello, i made a 3way ctf, and iwant the flag to be returned when the flagbearer dies.

Im using the scripts posted in another post by captain haddock. And the script works i.e. the flag gets returnde. but somehow it executes all the scripts (the 3 scripts) so all the flags get returned. its very frustrating plz help me.

This is an example of 1 of the 3 triggers. The westflag is called FlagW, eastflag FlagE, and resistance flag is FlagR;

this is what the trigger looks like: its 0 0 (size)and set on repeatedly

ReturnResiflag (text)

Condition: !alive flagowner flagR

On activation:[] exec "returnresiflag.sqs"

This is what the script looks like. Its caleld returnresiflag.sqs

#loop

_nb=0

~0.001

#nextloop

?(alive flagOwner flagR) : goto "end"

~1

_nb=_nb+1

? ( _nb < 60 ) : goto "nextloop"

flagR setflagowner objnull

CutText ["The Resistance flag was returned...","PLAIN",2]

~6

CutText ["","PLAIN",0]

#end

exit

Ok it gets more complicated. I kept at it, and the flags get returned BUT (and its a major but  wow.gif ) when u start the mission, depending on what side u are (Resistance sees nato flag returned, soviet resistance flag returned, and Nato sees soviet flag returned) u get the returned message after approxiamtely 1 minute of play.

ANother thing that s not right is that when the NATO flag gets returned, u c the message appear in the middle of the screen: NATO flag was returned....;(Thats what i typed in the returnwest.sqs). SImultaneously u cthe message NATO flag was returned (Without the dots at the end) apeear at the bottom of the screen, and it stays there for longer. Now what is causing these two rpoblems. PLZ HELP

Here s the westreturnflag.sqs

#loop

_nb=0

~0.001

#nextloop

?(alive flagOwner flagW) : goto "end"

~1

_nb=_nb+1

? ( _nb < 60 ) : goto "nextloop"

flagW setflagowner objnull

CutText ["The NATO flag was returned...","PLAIN",2]

~6

CutText ["","PLAIN",0]

#end

exit

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×