[GUI] CTF trigger

General talk about editing, cheating, and deprotecting maps.

Moderator: Cheaters

kiwwi93
Junior Member
Posts: 45
Joined: July 27th, 2009, 7:35 am
Location: WA, USA

[GUI] CTF trigger

Post by kiwwi93 »

can someone help me make a capture the flag trigger, I made a terrible one that works backwards, and i can't figure out the variables. Whatever i do still seems to work backwards. :neutral: this is what it looks like
Spoiler:
Events
Unit - A unit Acquires an item
Conditions
(Item being manipulated) Equal to Team2Flag
Actions
Set TempPoint1 = (Center of zamflag1 <gen>)
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(zamflag1 <gen> contains (Triggering unit)) Equal to True
Then - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Triggering unit) is in Team2_Units) Equal to True
Then - Actions
Item - Move Team2Flag to TempPoint1
Else - Actions
Game - Display to Team2 for 5.00 seconds the text: (|c99FF0000Your Flag Has Been Taken By + ((Name of (Owner of (Triggering unit))) + !!!!!!!|r))
Else - Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
((Triggering unit) is in Team2_Units) Equal to True
Then - Actions
Trigger - Turn off Flag2 Return <gen>
Item - Move Team2Flag to TempPoint1
Set PlayerReturns[(Player number of (Owner of (Triggering unit)))] = (PlayerReturns[(Player number of (Owner of (Triggering unit)))] + 1)
Multiboard - Set the text for (Last created multiboard) item in column 6, row Multiboard_Spots[(Player number of (Owner of (Triggering unit)))] to (String(PlayerReturns[(Player number of (Owner of (Triggering unit)))]))
Game - Display to Team2 for 5.00 seconds the text: (|c66FFCC00Your Flag Has Been Returned By + ((Name of (Owner of (Triggering unit))) + !!!!!!!|r))
Player Group - Pick every player in Team2 and do (Actions)
Loop - Actions
Player - Add 25 to (Picked player) Current gold
Trigger - Turn on Flag2 Return <gen>
Else - Actions
Game - Display to Team2 for 5.00 seconds the text: (|c99FF0000Your Flag Has Been Taken By + ((Name of (Owner of (Triggering unit))) + !!!!!!!|r))
Custom script: call RemoveLocation( udg_TempPoint1 )
sorry if the map is poor quality, its my first and i accidentily added a bunch of stuff to it from another map,
You do not have the required permissions to view the files attached to this post.
Last edited by kiwwi93 on September 20th, 2009, 7:03 am, edited 1 time in total.
Image
Black-Hole
Forum Fanatic
Posts: 315
Joined: October 16th, 2007, 7:32 pm

Re: [GUI] CTF trigger

Post by Black-Hole »

Thats interesting, Can't open your map, are you using a third party World editor? Or the one from Blizzard

You got a very confusing looking trigger, Next time post your triggers in Code so its alittle easer to read.
Ok
1) Where is Zamflag1
2) I have a feeling it loses who the triggering unit I would create a variable that saves the Triggering unit at the start and than resets the variable at the end.
3) I feel it would be easer and more effective if you turn this into 2 Triggers It can be easily done with 1 but try it with 2 and see if you get the same problems. If you Post a map that i can open i can get the trigger working, but like i said for now try making it 2 triggers.

I didn't make any changes to the trigger below its exactly the same as yours just easer to read.
Spoiler for Your trigger:

Code: Select all

Unit - A unit Acquires an item
Conditions
(Item being manipulated) Equal to Team2Flag
Actions
Set TempPoint1 = (Center of zamflag1 <gen>)
       If (All Conditions are True) then do (Then Actions) else do (Else Actions)
       If - Conditions
                 (zamflag1 <gen> contains (Triggering unit)) Equal to True
       Then - Actions
                 If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                 If - Conditions
                           ((Triggering unit) is in Team2_Units) Equal to True
                 Then - Actions
                           Item - Move Team2Flag to TempPoint1
                 Else - Actions
                         Game - Display to Team2 for 5.00 seconds the text: (|c99FF0000Your Flag Has Been Taken By + ((Name of (Owner of (Triggering unit))) + !!!!!!!|r))
       Else - Actions
                If (All Conditions are True) then do (Then Actions) else do (Else Actions)
                If - Conditions
                          ((Triggering unit) is in Team2_Units) Equal to True
                Then - Actions
                          Trigger - Turn off Flag2 Return <gen>
                          Item - Move Team2Flag to TempPoint1
                          Set PlayerReturns[(Player number of (Owner of (Triggering unit)))] = (PlayerReturns[(Player number of (Owner of (Triggering unit)))] + 1)
                          Multiboard - Set the text for (Last created multiboard) item in column 6, row Multiboard_Spots[(Player number of (Owner of (Triggering unit)))] to (String(PlayerReturns[(Player number of (Owner of (Triggering unit)))]))
                          Game - Display to Team2 for 5.00 seconds the text: (|c66FFCC00Your Flag Has Been Returned By + ((Name of (Owner of (Triggering unit))) + !!!!!!!|r))
                          Player Group - Pick every player in Team2 and do (Actions)
                                      Loop - Actions
                                               Player - Add 25 to (Picked player) Current gold
                                               Trigger - Turn on Flag2 Return <gen>
               Else - Actions
                       Game - Display to Team2 for 5.00 seconds the text: (|c99FF0000Your Flag Has Been Taken By + ((Name of (Owner of (Triggering unit))) + !!!!!!!|r))
                       Custom script: call RemoveLocation( udg_TempPoint1 )
kiwwi93
Junior Member
Posts: 45
Joined: July 27th, 2009, 7:35 am
Location: WA, USA

Re: [GUI] CTF trigger

Post by kiwwi93 »

thanx man tried it and it works now :D
Image