- Joined
- May 1, 2009
- Messages
- 52
Right... I have a building in the center of the map which is meant to be controlled by the team who has the most heroes near it, If no heroes are near it or if the amounts are equal the building should become under neutral passive's control now i have the problem that the structure itself, and summoned units count towards the unit number, which isnt fair obviously, Can't seem to figure out how to do it.
Team1 = Red(computer), Purple and Pink.
Team2 = Blue(computer, Light Blue and Grey.
Team3 = Teal(computer), Green and Dark Green.
Team4 = Yellow(computer), Orange and Brown.
When a team controls the center the computer player is meant to have control over the central building.
I know my trigger might be bit messy, or leaky, and if there is an easyer way to do something like this tell me please
Edit: Updated Triggers
-
Observatory
-
Events
- Time - Every 0.01 seconds of game time
- Conditions
-
Actions
- Set Team1 = (Units in Observatory Capture Area <gen> owned by Player 1 (Red))
- Unit Group - Add all units of (Units in Observatory Capture Area <gen> owned by Player 4 (Purple)) to Team1
- Unit Group - Add all units of (Units in Observatory Capture Area <gen> owned by Player 8 (Pink)) to Team1
- Set Team2 = (Units in Observatory Capture Area <gen> owned by Player 2 (Blue))
- Unit Group - Add all units of (Units in Observatory Capture Area <gen> owned by Player 10 (Light Blue)) to Team2
- Unit Group - Add all units of (Units in Observatory Capture Area <gen> owned by Player 9 (Gray)) to Team2
- Set Team3 = (Units in Observatory Capture Area <gen> owned by Player 3 (Teal))
- Unit Group - Add all units of (Units in Observatory Capture Area <gen> owned by Player 7 (Green)) to Team3
- Unit Group - Add all units of (Units in Observatory Capture Area <gen> owned by Player 11 (Dark Green)) to Team3
- Set Team4 = (Units in Observatory Capture Area <gen> owned by Player 5 (Yellow))
- Unit Group - Add all units of (Units in Observatory Capture Area <gen> owned by Player 6 (Orange)) to Team4
- Unit Group - Add all units of (Units in Observatory Capture Area <gen> owned by Player 12 (Brown)) to Team4
- Set Team1number = (Real((Number of units in Team1)))
- Set Team2number = (Real((Number of units in Team2)))
- Set Team3number = (Real((Number of units in Team3)))
- Set Team4number = (Real((Number of units in Team4)))
- Set ControllerObs = (Owner of The Observatory 0059 <gen>)
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- Team1number Greater than Team2number
- Team1number Greater than Team3number
- Team1number Greater than Team4number
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ControllerObs Equal to Player 1 (Red)
- Then - Actions
-
Else - Actions
- Unit - Change ownership of The Observatory 0059 <gen> to Player 1 (Red) and Change color
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
And - All (Conditions) are true
-
Conditions
- Team2number Greater than Team1number
- Team2number Greater than Team3number
- Team2number Greater than Team4number
-
Conditions
-
And - All (Conditions) are true
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ControllerObs Equal to Player 2 (Blue)
- Then - Actions
-
Else - Actions
- Unit - Change ownership of The Observatory 0059 <gen> to Player 2 (Blue) and Change color
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
And - All (Conditions) are true
-
Conditions
- Team3number Greater than Team1number
- Team3number Greater than Team2number
- Team3number Greater than Team4number
-
Conditions
-
And - All (Conditions) are true
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ControllerObs Equal to Player 3 (Teal)
- Then - Actions
-
Else - Actions
- Unit - Change ownership of The Observatory 0059 <gen> to Player 3 (Teal) and Change color
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
And - All (Conditions) are true
-
Conditions
- Team4number Greater than Team1number
- Team4number Greater than Team2number
- Team4number Greater than Team3number
-
Conditions
-
And - All (Conditions) are true
-
Then - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- (Owner of The Observatory 0059 <gen>) Equal to Player 5 (Yellow)
- Then - Actions
-
Else - Actions
- Unit - Change ownership of The Observatory 0059 <gen> to Player 5 (Yellow) and Change color
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Else - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- ControllerObs Equal to Neutral Passive
- Then - Actions
-
Else - Actions
- Unit - Change ownership of The Observatory 0059 <gen> to Neutral Passive and Change color
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
Events
Team1 = Red(computer), Purple and Pink.
Team2 = Blue(computer, Light Blue and Grey.
Team3 = Teal(computer), Green and Dark Green.
Team4 = Yellow(computer), Orange and Brown.
When a team controls the center the computer player is meant to have control over the central building.
I know my trigger might be bit messy, or leaky, and if there is an easyer way to do something like this tell me please
Edit: Updated Triggers
Last edited: