Dameon
"All the power in the world resides in the eyes"
- Reaction score
- 127
Ok so I kill unit O_U([1]) but for some reason the trigger suddenly changes integer a's value from 1 to 5. which is causing a big problem. These are the 2 triggers, I am leaving out the one that creates the DL_U cause all it does is create them then sets them to a variable and hides them.
So this is what is happening, when I kill unit O_U([1]) the invulnerable ability is removed from O_U([5]) and it displays a 5 in game chat. It should be removing the ability from O_U([2]) and displaying a 1 but for some reason it gives a 5 and I don't know why.
Trigger:
- MI
- Events
- Map initialization
- Conditions
- Actions
- For each (Integer A) from 1 to 4, do (Actions)
- Loop - Actions
- Unit - Create 1 Angelic Obelisk for Player 9 (Gray) at ((Player((Integer A))) start location) facing Default building facing degrees
- Set O_U[(Integer A)] = (Last created unit)
- Unit - Create 1 Demonic Obelisk for Player 11 (Dark Green) at ((Player(((Integer A) + 4))) start location) facing Default building facing degrees
- Set O_U[((Integer A) + 4)] = (Last created unit)
- Loop - Actions
- Unit - Remove Invulnerable (Neutral) from O_U[1]
- For each (Integer A) from 1 to 4, do (Actions)
- Events
Trigger:
- O Killed
- Events
- Unit - A unit Dies
- Conditions
- Actions
- For each (Integer A) from 1 to 4, do (Actions)
- Loop - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Dying unit) Equal to O_U[(Integer A)]
- Then - Actions
- Unit - Kill O_U[((Integer A) + 4)]
- Unit - Remove Invulnerable (Neutral) from O_U[((Integer A) + 1)]
- Game - Display to (All players) the text: (String((Integer A)))
- Unit - Unhide DL_U[(Integer A)]
- Unit - Order DL_U[(Integer A)] to Attack-Move To (Position of O_U[((Integer A) + 1)])
- Else - Actions
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Loop - Actions
- For each (Integer A) from 1 to 4, do (Actions)
- Events
So this is what is happening, when I kill unit O_U([1]) the invulnerable ability is removed from O_U([5]) and it displays a 5 in game chat. It should be removing the ability from O_U([2]) and displaying a 1 but for some reason it gives a 5 and I don't know why.