Home   Help Search Login Register  

Author Topic: Anti Flag Zone Flag Tracker  (Read 1527 times)

0 Members and 1 Guest are viewing this topic.

Dave OFPL

  • Guest
Anti Flag Zone Flag Tracker
« on: 21 Oct 2002, 20:44:47 »
Hey, I want to make it so West cannot take East Flag into their respawn and if they do they get killed and the flag returns to the pole.  

Also say West take East flag but dont cap it - Can I create a map marker that comes up.  Say after 5 minutes of taking East flag the West player with the flag is shown on the map as a cross or something.

Thanks

Dave OFPL

  • Guest
Re:Anti Flag Zone Flag Tracker
« Reply #1 on: 23 Oct 2002, 01:04:26 »
Well I managed to sort the Anti flags in respawn myself but I am struggling with the flag tracker.

 made a trigger with activation
(flagowner vlajkaUSA == ownerU)

And after a delay of 5 minutes it executes a script which I found:

#loop

?(flagowner vlajkaUSA == ownerU) : "us_flag_1" SetMarkerPos (GetPos ownerU)
?(flagowner vlajkaRUS == ownerR) : "rus_flag_1" SetMarkerPos (GetPos ownerR)

?(flagowner vlajkaUSA == ownerU) : "us_flag" SetMarkerColor "ColorRed"
?(flagowner vlajkaRUS == ownerR) : "rus_flag" SetMarkerColor "ColorRed"

?(flagowner vlajkaUSA == ownerU) : "us_flag_1" SetMarkerType "Marker"
?(flagowner vlajkaRUS == ownerR) : "rus_flag_1" SetMarkerType "Marker"

~1

?(flagowner vlajkaUSA == ownerU) : "us_flag" SetMarkerColor "ColorGreen"
?(flagowner vlajkaRUS == ownerR) : "rus_flag" SetMarkerColor "ColorGreen"

?(flagowner vlajkaUSA == ownerU) : "us_flag_1" SetMarkerType "Flag1"
?(flagowner vlajkaRUS == ownerR) : "rus_flag_1" SetMarkerType "Flag1"

goto "loop"

This shows the location of the flag as a marker on a map, however if the player with the flag gets killed the script keeps on running?  And if the player caps the flag the marker doesnt return to the other pole. Any help given will be appreciated!

Pope_Zog

  • Guest
Re:Anti Flag Zone Flag Tracker
« Reply #2 on: 23 Oct 2002, 15:55:11 »
Before the line:
Code: [Select]
goto "loop"
Put:
Code: [Select]
; If you don't add a delay here then the pretty marker colours won't flash :)
~1

; Check whether or not the flag carrier is dead.
?(not alive flagowner vlajkaUSA) : goto "reset_marker_usa"
?(not alive flagowner vlajkaRUS) : goto "reset_marker_rus"

; Check whether or not the owner has been set to null
?(ownerU == objNull) : goto "reset_marker_usa"
?(ownerR == objNull) : goto "reset_marker_rus"

; Finally return to the loop.
goto "loop"

; Reset the Nato marker to its flagpole.
#reset_marker_usa
"us_flag_1" SetMarkerPos (GetPos vlajkaUSA)
exit

; Reset the Russian marker to its flagpole.
#reset_marker_rus
"rus_flag_1" SetMarkerPos (GetPos vlajkaRUS)
exit

I'm writing this off the top of my head so be aware that it'll very likely contain bugs.

Pope Zog

Dave OFPL

  • Guest
Re:Anti Flag Zone Flag Tracker
« Reply #3 on: 03 Nov 2002, 13:07:37 »
Doesnt seem to work :)

No markers at all are shown flashing :(

The script looks like:

#loop

?(flagowner vlajkaUSA == ownerU) : "us_flag_1" SetMarkerPos (GetPos ownerU)
?(flagowner vlajkaRUS == ownerR) : "rus_flag_1" SetMarkerPos (GetPos ownerR)

?(flagowner vlajkaUSA == ownerU) : "us_flag" SetMarkerColor "ColorRed"
?(flagowner vlajkaRUS == ownerR) : "rus_flag" SetMarkerColor "ColorRed"

?(flagowner vlajkaUSA == ownerU) : "us_flag_1" SetMarkerType "Marker"
?(flagowner vlajkaRUS == ownerR) : "rus_flag_1" SetMarkerType "Marker"

~1

?(flagowner vlajkaUSA == ownerU) : "us_flag" SetMarkerColor "ColorGreen"
?(flagowner vlajkaRUS == ownerR) : "rus_flag" SetMarkerColor "ColorGreen"

?(flagowner vlajkaUSA == ownerU) : "us_flag_1" SetMarkerType "Flag1"
?(flagowner vlajkaRUS == ownerR) : "rus_flag_1" SetMarkerType "Flag1"

; If you don't add a delay here then the pretty marker colours won't flash :)
~1

; Check whether or not the flag carrier is dead.
?(not alive flagowner vlajkaUSA) : goto "reset_marker_usa"
?(not alive flagowner vlajkaRUS) : goto "reset_marker_rus"

; Check whether or not the owner has been set to null
?(ownerU == objNull) : goto "reset_marker_usa"
?(ownerR == objNull) : goto "reset_marker_rus"

; Finally return to the loop.
goto "loop"

; Reset the Nato marker to its flagpole.
#reset_marker_usa
"us_flag_1" SetMarkerPos (GetPos vlajkaUSA)
exit

; Reset the Russian marker to its flagpole.
#reset_marker_rus
"rus_flag_1" SetMarkerPos (GetPos vlajkaRUS)
exit

goto "loop"