- Joined
- Feb 6, 2008
- Messages
- 166
I've got an array of integers keeping track of kill-death scores. The boss of the arena is ridiculously tank, but only attacks the player with the highest priority.
This is what I have so far:
-
Titan Priority
-
Events
- Unit - A unit Dies
-
Conditions
- ((Triggering unit) is A Hero) Equal to True
-
Actions
- -------- Triggers that update titanPriority go here. --------
-
For each (Integer A) from 1 to 12, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
- titanPriority[(Integer A)] Equal to True
-
Then - Actions
- Player - Make Neutral Extra treat PlayerIndex[(Integer A)] as an Enemy
-
Else - Actions
- Player - Make Neutral Extra treat PlayerIndex[(Integer A)] as an Ally
-
If - Conditions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
Loop - Actions
-
Events
Key details:
- The player with the most kills and least deaths has boss targeting priority. Set titanPriority[Player number] = true.
- If more than one player are tied for most kills and least deaths, they are all enemies in the eyes of the boss.
- All other players are "safe". Set titanPriority[Player number] = false.
- Each time someone's hero dies, the triggers update titanPriority for all players, then updates alliance status accordingly.
((Edit: Just in case a mod is here... even though I have part of a trigger there, I believe this thread belongs here in WE Help Zone, because I am asking for help on a piece of the trigger that is missing, not defective. Hopefully, I understand the distinction between the two sections correctly.))
Last edited: