- Joined
- Nov 29, 2008
- Messages
- 291
I need some help with this revival trigger.
How do I change this trigger to revive the hero at a random point in a region and not the center of it.
Thank you in advance.
How do I change this trigger to revive the hero at a random point in a region and not the center of it.
-
Revive
-
Events
-
Unit - A unit Dies
-
Conditions
-
((Dying unit) is A Hero) Equal to True
-
(Owner of (Dying unit)) Not equal to Player 11 (Dark Green)
-
Actions
-
Custom script: local timerdialog WINDOW
-
Custom script: local integer HEROWAIT
-
Custom script: local timer TIMER
-
Custom script: local unit HERO
-
Custom script: set HERO = GetDyingUnit()
-
Custom script: set HEROWAIT = (GetHeroLevel(HERO) *3 )
-
Custom script: set TIMER = CreateTimer()
-
Custom script: call StartTimerBJ(TIMER, false, ( I2R(HEROWAIT) ))
-
Custom script: call CreateTimerDialogBJ( TIMER, GetPlayerName(GetOwningPlayer(HERO)) )
-
Custom script: set WINDOW = GetLastCreatedTimerDialogBJ()
-
Custom script: call PolledWait( HEROWAIT )
-
Custom script: call ReviveHeroLoc(HERO, GetRectCenter(GetPlayableMapRect()), true )
-
Custom script: call PanCameraToTimedLocForPlayer( GetOwningPlayer(HERO), GetUnitLoc(HERO), 0.60 )
-
Custom script: call DestroyTimerDialog(WINDOW)