- Joined
- Jul 8, 2008
- Messages
- 150
Here is my trigger: as it is right now, when a hero dies, a timer window for that hero will appear and display to all players. i want it to display to only the owner of the dying unit. How do I do that?
-
Revive
-
Events
-
Unit - A unit Dies
-
-
Conditions
-
((Triggering unit) is A Hero) Equal to True
-
(Unit-type of (Triggering unit)) Not equal to Death Lord
-
-
Actions
-
Custom script: local timerdialog DeadHero_Window
-
Custom script: local integer DeadHero_Wait
-
Custom script: local timer DeadHero_Timer
-
Custom script: local unit DeadHero_Unit
-
Custom script: set DeadHero_Unit = GetDyingUnit()
-
Custom script: set DeadHero_Wait = ( ( GetHeroLevel(DeadHero_Unit) * 2 ) + 25 )
-
Custom script: set DeadHero_Timer = CreateTimer()
-
Custom script: call StartTimerBJ(DeadHero_Timer, false, ( I2R(DeadHero_Wait) ))
-
Custom script: call CreateTimerDialogBJ( DeadHero_Timer, GetUnitName(DeadHero_Unit) )
-
Custom script: set DeadHero_Window = GetLastCreatedTimerDialogBJ()
-
Custom script: call TimerDialogDisplayForPlayerBJ( true, DeadHero_Window, GetOwningPlayer(DeadHero_Unit) )
-
Custom script: call PolledWait( DeadHero_Wait )
-
Custom script: call ReviveHeroLoc(DeadHero_Unit, GetPlayerStartLocationLoc(GetOwningPlayer(DeadHero_Unit)), true )
-
Custom script: call DestroyTimerDialog(DeadHero_Window)
-
-