HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Problem with CTF trigger ...

01-29-2007, 07:21 PM#1
mikke95
Hey i got a problem with my Capture the Flag triggers ...
The return trigger doesn't work team 1 can just pick up team 1's flag ...

Init trigger:
Trigger:
CTF Init
Collapse Events
Map initialization
Conditions
Collapse Actions
Set Team1 = (Center of Team 1 Flag <gen>)
Set Team2 = (Center of Team 2 Flag <gen>)
Set Flags[1] = Claws of Attack +15 0036 <gen>
Set Flags[2] = Crown of Kings +5 0037 <gen>
Set Score[1] = 0
Set Score[2] = 0
-------- --------
Player Group - Add Player 1 (Red) to Team[1]
Player Group - Add Player 2 (Blue) to Team[1]
Player Group - Add Player 3 (Teal) to Team[1]
Player Group - Add Player 4 (Purple) to Team[1]
Player Group - Add Player 5 (Yellow) to Team[1]
-------- --------
Player Group - Add Player 6 (Orange) to Team[2]
Player Group - Add Player 7 (Green) to Team[2]
Player Group - Add Player 8 (Pink) to Team[2]
Player Group - Add Player 9 (Gray) to Team[2]
Player Group - Add Player 10 (Light Blue) to Team[2]

Capture the Flag 2 trigger:
Trigger:
Capture Flag 2
Collapse Events
Unit - A unit enters Team 1 Flag <gen>
Collapse Conditions
(Owner of (Entering unit)) Equal to (Random player from Team[1])
((Entering unit) has Flags[2]) Equal to True
Collapse Actions
Set Score[1] = (Score[1] + 1)
Hero - Drop Flags[2] from (Entering unit)
Item - Move Flags[2] to (Center of Team 2 Flag <gen>)
Game - Display to (All players) for 8.00 seconds the text: (Team 1 scored! + ((String(Score[1])) + points!))

Capture the Flag 1 trigger:
Trigger:
Capture Flag 1
Collapse Events
Unit - A unit enters Team 2 Flag <gen>
Collapse Conditions
(Owner of (Entering unit)) Equal to (Random player from Team[2])
((Entering unit) has Flags[1]) Equal to True
Collapse Actions
Set Score[2] = (Score[2] + 1)
Hero - Drop Flags[1] from (Entering unit)
Item - Move Flags[1] to (Center of Team 1 Flag <gen>)
Game - Display to (All players) for 8.00 seconds the text: (Team 2 scored! + ((String(Score[2])) + points!))

Return 1 Trigger:

Trigger:
Return 1
Collapse Events
Unit - A unit Acquires an item
Collapse Conditions
(Matching item) Equal to Flags[1]
(Owner of (Triggering unit)) Equal to (Random player from Team[1])
Collapse Actions
Game - Display to (All players) for 8.00 seconds the text: Team 1 has returned...
Wait 0.10 seconds
Hero - Drop Flags[1] from (Triggering unit)
Item - Move Flags[1] to (Center of Team 1 Flag <gen>)

Return 2 trigger:

Trigger:
Return 2
Collapse Events
Unit - A unit Acquires an item
Collapse Conditions
(Matching item) Equal to Flags[2]
(Owner of (Triggering unit)) Equal to (Random player from Team[2])
Collapse Actions
Game - Display to (All players) for 8.00 seconds the text: Team 2 has returned...
Wait 0.10 seconds
Hero - Drop Flags[2] from (Triggering unit)
Item - Move Flags[2] to (Center of Team 1 Flag <gen>)

Please help me! +REP if you can help!
01-29-2007, 07:45 PM#2
Ammorth
Don't use random player. Use "Boolean > Player Group - Is Player in Group > Owner of Unit > Triggering Unit"
01-29-2007, 07:46 PM#3
Feroc1ty
No idea what the problem is?

anyways why are you making claws of attack flag for team 1, and crown for team 2? There is a flag item, and it adds a flag spec effect to the unit too.
01-29-2007, 07:46 PM#4
Hero12341234
Aren't the waits interfering with the unit..After the wait the unit source is lost and is nulled
01-29-2007, 07:55 PM#5
Ammorth
Triggering Unit is not lost, only Casting Unit and Target Unit of Ability Being Cast. The wait is there because the event fires before the unit acquires the item. It then waits so that unit has the item, and then drops it.
01-29-2007, 08:35 PM#6
The_AwaKening
Your problem is what Ammorth said. You are checking if the Players is equal to a random player selected from team[1] which means it will only work about 20% of the time. I don't use GUI, but there should be a boolean to check exactly what Ammorth said. The wait is not a problem.
01-29-2007, 08:42 PM#7
The)TideHunter(
Instead of

Trigger:
Conditions
(Owner of (Entering unit)) Equal to (Random player from Team[1])

Use:

Trigger:
Conditions
((Owner of (Triggering unit)) is in Team[1]) Equal to True
01-30-2007, 02:15 PM#8
mikke95
Okay thanks guys i gotta go fix it ^^
01-30-2007, 02:27 PM#9
mikke95
Damn it still doesn't work ...

Trigger:
CTF Init
Collapse Events
Map initialization
Conditions
Collapse Actions
Set Team1 = (Center of Team 1 Flag <gen>)
Set Team2 = (Center of Team 2 Flag <gen>)
Set Flags[1] = Claws of Attack +15 0036 <gen>
Set Flags[2] = Crown of Kings +5 0037 <gen>
Set Score[1] = 0
Set Score[2] = 0
-------- --------
Unit Group - Add Blademaster 0039 <gen> to Team[1]
Unit Group - Add Mountain King 0038 <gen> to Team[1]
Unit Group - Add Death Knight 0040 <gen> to Team[1]
Unit Group - Add Blood Mage 0042 <gen> to Team[1]
Unit Group - Add Keeper of the Grove 0041 <gen> to Team[1]
-------- --------
Unit Group - Add Blademaster 0043 <gen> to Team[2]
Unit Group - Add Death Knight 0044 <gen> to Team[2]
Unit Group - Add Keeper of the Grove 0045 <gen> to Team[2]
Unit Group - Add Blood Mage 0046 <gen> to Team[2]
Unit Group - Add Blademaster 0047 <gen> to Team[2]

Trigger:
Capture Flag 2
Collapse Events
Unit - A unit enters Team 1 Flag <gen>
Collapse Conditions
((Triggering unit) is in Team[1]) Equal to True
((Entering unit) has Flags[2]) Equal to True
Collapse Actions
Set Score[1] = (Score[1] + 1)
Hero - Drop Flags[2] from (Entering unit)
Item - Move Flags[2] to (Center of Team 2 Flag <gen>)
Game - Display to (All players) for 8.00 seconds the text: (Team 1 scored! + ((String(Score[1])) + points!))

Trigger:
Capture Flag 1
Collapse Events
Unit - A unit enters Team 2 Flag <gen>
Collapse Conditions
((Triggering unit) is in Team[2]) Equal to True
((Entering unit) has Flags[1]) Equal to True
Collapse Actions
Set Score[2] = (Score[2] + 1)
Hero - Drop Flags[1] from (Entering unit)
Item - Move Flags[1] to (Center of Team 1 Flag <gen>)
Game - Display to (All players) for 8.00 seconds the text: (Team 2 scored! + ((String(Score[2])) + points!))

Trigger:
Return 1
Collapse Events
Unit - A unit Acquires an item
Collapse Conditions
(Matching item) Equal to Flags[1]
((Triggering unit) is in Team[1]) Equal to True
Collapse Actions
Game - Display to (All players) for 8.00 seconds the text: Team 1 has returned...
Wait 0.10 seconds
Hero - Drop Flags[1] from (Triggering unit)
Item - Move Flags[1] to (Center of Team 1 Flag <gen>)

Trigger:
Return 2
Collapse Events
Unit - A unit Acquires an item
Collapse Conditions
(Matching item) Equal to Flags[2]
((Triggering unit) is in Team[2]) Equal to True
Collapse Actions
Game - Display to (All players) for 8.00 seconds the text: Team 2 has returned...
Wait 0.10 seconds
Hero - Drop Flags[2] from (Triggering unit)
Item - Move Flags[2] to (Center of Team 1 Flag <gen>)

Trigger:
Team 1 pick up flag
Collapse Events
Unit - A unit Acquires an item
Collapse Conditions
(Matching item) Equal to Flags[2]
((Triggering unit) is in Team[1]) Equal to True
Collapse Actions
Game - Display to (All players) for 8.00 seconds the text: Team 1 has stolen t...

and the last trigger ...
Trigger:
Team 2 pick up flag
Collapse Events
Unit - A unit Acquires an item
Collapse Conditions
(Matching item) Equal to Flags[1]
((Triggering unit) is in Team[2]) Equal to True
Collapse Actions
Game - Display to (All players) for 8.00 seconds the text: Team 2 has stolen t...
01-30-2007, 04:18 PM#10
The)TideHunter(
Its because your using Matching item in some conditions.
Never use Matching unit/item/player or Picked unit/player in a triggers condition, it will not work, you can only use matching unit/item/player when you use the actions condition same with picked unit/player.

If you want to refer a item from a event, in your case A unit Acquires an item, use Manipulated Item, thats practically Triggering Item.
01-30-2007, 04:51 PM#11
mikke95
THANK YOU!! it worked! :)
As i said before you deserves +rep