Home   Help Search Login Register  

Author Topic: my ctf script  (Read 1421 times)

0 Members and 1 Guest are viewing this topic.

Cap

  • Guest
my ctf script
« on: 21 Feb 2005, 21:36:45 »
i made this ctf script but it wont work please can sum 1 fix it for me please, i would really appreciate if you could tell me whats wrong with mine rather than post a completely new one so i can see where im going wrong.

thanks here it is

westscore = 0
eastscore = 0
westdead = false
eastdead = false

#start
westtake = false
easttake = false
westflagowner = flagowner flagW
eastflagowner = flagowner flagE
?(side westflagowner == east): goto "easthavewest"
?(side eastflagowner == west): goto "westhaveeast"
goto "start"

#easthavewest
westflagowner = flagowner flagW
eastflagowner = flagowner flagE
?(eastflagowner == flagE): titleText [format["The East flag is back"]; goto "start"
easttake = true
?!(alive westflagowner)&&(eastdead == false): eastdead == true, [] exec "eastcount.sqs"
?!(alive westflagowner)&&(eastcount == 15): titleText [format["The West flag is back"]; "PLAIN DOWN"]; easttake = false; goto "westreturn"
?(westflagowner distance flagE < 3): goto "eastcapturewest"
?(side eastflagowner == west): easttake = true; goto "bothhave"
goto "easthavewest"

#westhaveeast
westflagowner = flagowner flagW
eastflagowner = flagowner flagE
?(westflagowner == flagW): titleText [format["The West flag is back"]; goto "start"
westtake = true
?!(alive eastflagowner)&&(westdead == false): westdead == true; [] exec "westcount.sqs"
?!(alive eastflagowner)&&(westcount == 15): titleText [format["The East flag is back"]; "PLAIN DOWN"]; westtake = false; goto "eastreturn"
?(westflagowner distance flagW < 3): goto "westcaptureeast"
?(side westflagowner == east): westtake = true; goto "bothhave"
goto "westhaveeast"

#eastcapturewest
titleText [format["%1 (East) captures the West flag", name westflagowner], "PLAIN DOWN"]
eastscore = eastscore + parram1
goto "eastreturn"

#westcaptureeast
titleText [format["%1 (West) captures the East flag", name eastflagowner], "PLAIN DOWN"]
westscore = westscore + parram1
goto "eastreturn"

#westreturn
easttake = false
flagW setflagowner flagW
flagW side west
goto "start"

#eastreturn
westtake = flase
flagE setflagowner flagE
flagE side east
goto "start"


#bothhave
westflagowner = flagowner flagW
eastflagowner = flagowner flagE
?(westflagowner == flagW): titleText [format["The West flag is back"]; goto "start"
?(eastflagowner == flagE): titleText [format["The East flag is back"]; goto "start"
?!(alive eastflagowner)&&(westdead == false): westdead == true; [] exec "westcount.sqs"
?!(alive westflagowner)&&(eastdead == false): eastdead == true, [] exec "eastcount.sqs"
?!(alive westflagowner)&&(eastcount == 15): titleText [format["The West flag is back"]; "PLAIN DOWN"]; easttake = false; goto "westreturn"
?!(alive eastflagowner)&&(westcount == 15): titleText [format["The East flag is back"]; "PLAIN DOWN"]; westtake = false; goto "eastreturn"
?(westflagowner distance flagE < 3): goto "eastcapturewest"
?(westflagowner distance flagW < 3): goto "westcaptureeast"
goto "bothhave"



..............................

I have scripts for when the flag carrier dies to give time before the flag is returned, to be honest if you can integrate them into the ctf script this would be good :D here 1 is the other is the same but for the other team


eastcount = 0

#start
~0.5
eastcount = eastcount + 0.5
?(eastcount == false): goto "end"
goto "start"

#end
exit

Cap

  • Guest
Re:my ctf script
« Reply #1 on: 21 Feb 2005, 21:50:00 »
acctually i dont mind if ugive me another script that will fit my map, just as long as it works lol but if u know where it is pls could u let me know.

thanks
« Last Edit: 21 Feb 2005, 21:50:33 by Cap »

Offline Terox

  • Former Staff
  • ****
  • Follow the Sappers!
    • zeus-community.net
Re:my ctf script
« Reply #2 on: 23 Feb 2005, 14:24:41 »
you need to set the flag side

Quote
EFlag SetFlagSide East
EFlag setflagtexture "rus_vlajka.pac"  
EFlag setFlagOwner objNull
goto "start"
Zeus ARMA2 server IP = 77.74.193.124 :2302
Teamspeak IP = 77.74.193.123

Cap

  • Guest
Re:my ctf script
« Reply #3 on: 24 Feb 2005, 23:34:50 »
naa did that in my init

Offline Terox

  • Former Staff
  • ****
  • Follow the Sappers!
    • zeus-community.net
Re:my ctf script
« Reply #4 on: 27 Feb 2005, 22:24:56 »
trace where the bug is by placing hint messages or titletext messages at key points in the script, thats how you debug

asking a specific question will normally get you an answer here

asking a "fix this" iwith no info on what it's not actually doing sn't likely to get a response m8
Zeus ARMA2 server IP = 77.74.193.124 :2302
Teamspeak IP = 77.74.193.123