Chao
Setting sail for fail in the sea of lame.
- Reaction score
- 63
It's ugly, I tell you! Since I already gave you the gist of what the problem is, here's the code I've been running with.
Then:
There's obviously one of those for each of the players in my game.
Trigger:
- AotS Res Start
- Events
- Unit - A unit Dies
- Conditions
- AotSOn Equal to True
- Or - Any (Conditions) are true
- Conditions
- (Dying unit) Equal to PlayerHero[1]
- (Dying unit) Equal to PlayerHero[2]
- (Dying unit) Equal to PlayerHero[3]
- (Dying unit) Equal to PlayerHero[4]
- (Dying unit) Equal to PlayerHero[5]
- (Dying unit) Equal to PlayerHero[6]
- Conditions
- Actions
- Set AotSDieTime = ((Real((Level of (Dying unit)))) / 2.00)
- Set MultiAotSInt2[(Player number of (Owner of (Dying unit)))] = (MultiAotSInt2[(Player number of (Owner of (Dying unit)))] + 1)
- Multiboard - Set the text for MultiAotS item in column 3, row (4 + (Player number of (Owner of (Dying unit)))) to (String(MultiAotSInt2[(Player number of (Owner of (Dying unit)))]))
- Countdown Timer - Start ResTimer[(Player number of (Owner of (Dying unit)))] as a One-shot timer that will expire in AotSDieTime seconds
- Countdown Timer - Create a timer window for ResTimer[(Player number of (Owner of (Dying unit)))] with title Resurrection in:
- Set ResTimerWindow[(Player number of (Owner of (Dying unit)))] = (Last created timer window)
- Countdown Timer - Show ResTimerWindow[(Player number of (Owner of (Dying unit)))] for (Owner of (Dying unit))
- For each (Integer A) from 1 to 6, do (Actions)
- Loop - Actions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- If - Conditions
- (Dying unit) Equal to PlayerHero[(Integer A)]
- Then - Actions
- Trigger - Run AotSResTriggers[(Integer A)] (checking conditions)
- Else - Actions
- Do nothing
- If - Conditions
- If (All Conditions are True) then do (Then Actions) else do (Else Actions)
- Loop - Actions
- Events
Then:
Trigger:
- AotS Res P1
- Events
- Conditions
- (PlayerHero[1] is dead) Equal to True
- AotSOn Equal to True
- Actions
- Wait AotSDieTime seconds
- Countdown Timer - Hide ResTimerWindow[1]
- Countdown Timer - Destroy ResTimerWindow[1]
- Set AotSMemPt = (Center of AotS Res <gen>)
- Hero - Instantly revive PlayerHero[1] at AotSMemPt, Hide revival graphics
- Custom script: call RemoveLocation(udg_AotSMemPt)
- Selection - Select PlayerHero[1] for Player 1 (Red)
- Set AotSMemPt = (Position of PlayerHero[1])
- Camera - Pan camera for Player 1 (Red) to AotSMemPt over 0.50 seconds
- Custom script: call RemoveLocation(udg_AotSMemPt)
- Unit Group - Add PlayerHero[1] to AotSHeroGroup
There's obviously one of those for each of the players in my game.