- Joined
- May 11, 2012
- Messages
- 2,108
Can someone check this "MUI" Respawn triggers to see is everything done correctly because sometimes this screwes up...
Thanks for your time
-
On Death
-
Events
-
Unit - A unit Dies
-
-
Conditions
-
((Dying unit) is A Hero) Equal to True
-
((Dying unit) belongs to an enemy of Player 1 (Red)) Equal to False
-
-
Actions
-
Set HeroRespawn_MaxIndex = (HeroRespawn_MaxIndex + 1)
-
Set HeroRespawn[HeroRespawn_MaxIndex] = (Dying unit)
-
Set HeroRespawn_Owner[HeroRespawn_MaxIndex] = (Owner of HeroRespawn[HeroRespawn_MaxIndex])
-
Set HeroRespawn_Time[HeroRespawn_MaxIndex] = ((Level of HeroRespawn[HeroRespawn_MaxIndex]) x 5)
-
Set TempPlayerGroup = (Player group(HeroRespawn_Owner[HeroRespawn_MaxIndex]))
-
For each (Integer TempInt) from 1 to 8, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
HeroRespawn_Owner[HeroRespawn_MaxIndex] Equal to Player[TempInt]
-
-
Then - Actions
-
Game - Display to TempPlayerGroup the text: (PlayerColors[TempInt] + ((Name of HeroRespawn_Owner[HeroRespawn_MaxIndex]) + ,|r |c00FDD017your hero has been killed!|r))
-
-
Else - Actions
-
-
-
-
Countdown Timer - Start HeroRespawn_Timer[HeroRespawn_MaxIndex] as a One-shot timer that will expire in ((Real((Level of HeroRespawn[HeroRespawn_MaxIndex]))) x 5.00) seconds
-
Countdown Timer - Create a timer window for (Last started timer) with title Respawn in:
-
Set HeroRespawn_TimerWindow[HeroRespawn_MaxIndex] = (Last created timer window)
-
Countdown Timer - Hide HeroRespawn_TimerWindow[HeroRespawn_MaxIndex]
-
Countdown Timer - Show HeroRespawn_TimerWindow[HeroRespawn_MaxIndex] for HeroRespawn_Owner[HeroRespawn_MaxIndex]
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
HeroRespawn_MaxIndex Equal to 1
-
-
Then - Actions
-
Trigger - Turn on On Respawn <gen>
-
-
Else - Actions
-
-
Custom script: call DestroyForce(udg_TempPlayerGroup)
-
Custom script: set udg_TempPlayerGroup = null
-
-
-
On Respawn
-
Events
-
Time - Every 1.00 seconds of game time
-
-
Conditions
-
Actions
-
For each (Integer HeroRespawn_Loop) from 1 to HeroRespawn_MaxIndex, do (Actions)
-
Loop - Actions
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
HeroRespawn_Time[HeroRespawn_Loop] Less than or equal to 0
-
-
Then - Actions
-
Game - Display to (All players) the text: Hero has Respawned
-
Sound - Play Respawn <gen>
-
Countdown Timer - Pause HeroRespawn_Timer[HeroRespawn_Loop]
-
Countdown Timer - Hide HeroRespawn_TimerWindow[HeroRespawn_Loop]
-
Countdown Timer - Destroy HeroRespawn_TimerWindow[HeroRespawn_Loop]
-
Set TempPlayerGroup = (Player group(HeroRespawn_Owner[HeroRespawn_Loop]))
-
Set TempPoint = (Center of Return Area <gen>)
-
Game - Display to TempPlayerGroup the text: |cff8080c0Your hero...
-
Special Effect - Create a special effect attached to the origin of HeroRespawn[HeroRespawn_Loop] using Abilities\Spells\Human\ReviveHuman\ReviveHuman.mdl
-
Special Effect - Destroy (Last created special effect)
-
Hero - Instantly revive HeroRespawn[HeroRespawn_Loop] at TempPoint, Show revival graphics
-
Selection - Select HeroRespawn[HeroRespawn_Loop] for HeroRespawn_Owner[HeroRespawn_Loop]
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
((Item carried by HeroRespawn[HeroRespawn_Loop] of type Health Potion) is owned) Equal to False
-
-
Then - Actions
-
Hero - Create Health Potion and give it to HeroRespawn[HeroRespawn_Loop]
-
Item - Set charges remaining in (Last created item) to 10
-
-
Else - Actions
-
Item - Set charges remaining in (Item carried by HeroRespawn[HeroRespawn_Loop] of type Health Potion) to ((Charges remaining in (Item carried by HeroRespawn[HeroRespawn_Loop] of type Health Potion)) + 3)
-
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
((Item carried by HeroRespawn[HeroRespawn_Loop] of type Mana Potion) is owned) Equal to False
-
-
Then - Actions
-
Hero - Create Mana Potion and give it to HeroRespawn[HeroRespawn_Loop]
-
Item - Set charges remaining in (Last created item) to 10
-
-
Else - Actions
-
Item - Set charges remaining in (Item carried by HeroRespawn[HeroRespawn_Loop] of type Mana Potion) to ((Charges remaining in (Item carried by HeroRespawn[HeroRespawn_Loop] of type Mana Potion)) + 3)
-
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
((Item carried by HeroRespawn[HeroRespawn_Loop] of type Ankh) is owned) Equal to False
-
-
Then - Actions
-
Hero - Create Ankh and give it to HeroRespawn[HeroRespawn_Loop]
-
Item - Set charges remaining in (Last created item) to 5
-
-
Else - Actions
-
-
Custom script: call DestroyForce(udg_TempPlayerGroup)
-
Custom script: call RemoveLocation(udg_TempPoint)
-
Set HeroRespawn[HeroRespawn_Loop] = HeroRespawn[HeroRespawn_MaxIndex]
-
Set HeroRespawn[HeroRespawn_MaxIndex] = No unit
-
Set HeroRespawn_Owner[HeroRespawn_Loop] = HeroRespawn_Owner[HeroRespawn_MaxIndex]
-
Set HeroRespawn_Time[HeroRespawn_Loop] = HeroRespawn_Time[HeroRespawn_MaxIndex]
-
Set HeroRespawn_Time[HeroRespawn_MaxIndex] = 0
-
Set HeroRespawn_Timer[HeroRespawn_Loop] = HeroRespawn_Timer[HeroRespawn_MaxIndex]
-
Set HeroRespawn_TimerWindow[HeroRespawn_Loop] = HeroRespawn_TimerWindow[HeroRespawn_MaxIndex]
-
Set HeroRespawn_MaxIndex = (HeroRespawn_MaxIndex - 1)
-
Set HeroRespawn_Loop = (HeroRespawn_Loop - 1)
-
-
Else - Actions
-
Set HeroRespawn_Time[HeroRespawn_Loop] = (HeroRespawn_Time[HeroRespawn_Loop] - 1)
-
Game - Display to (All players) the text: (HeroRespawnTime[ + ((String(HeroRespawn_Loop)) + (] = + (String(HeroRespawn_Time[HeroRespawn_Loop])))))
-
-
-
-
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
HeroRespawn_MaxIndex Equal to 0
-
-
Then - Actions
-
Trigger - Turn off (This trigger)
-
-
Else - Actions
-
-
Custom script: set udg_TempPlayerGroup = null
-
Custom script: set udg_TempPoint = null
-
-