• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

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