• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Fixing a Revival System

Status
Not open for further replies.
Level 13
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.
  • 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)
Thank you in advance.
 
Status
Not open for further replies.
Top