Need some help with random respawn location in JASS

Lu Bu

New Member
Reaction score
0
JASS:
function Trig_Zombie_Dies_Actions takes nothing returns nothing
	local unit s=GetTriggerUnit()
	call TriggerSleepAction((I2R(GetUnitLevel(s))*3.00))
	call SetUnitPositionLoc(s,GetRandomLocInRect(udg_rect08))
	call ReviveHeroLoc(s,GetRandomLocInRect(udg_rect08),false)
	call PanCameraToTimedLocForPlayer(GetOwningPlayer(s),GetUnitLoc(s),0)
	call SetUnitAnimation(s,"birth")
	call AddSpecialEffectLocBJ(GetUnitLoc(s),"Abilities\\Spells\\Undead\\RaiseSkeletonWarrior\\RaiseSkeleton.mdl")
	call DestroyEffectBJ(GetLastCreatedEffectBJ())
endfunction



Despite having GetRandomLocInRect, my locations still somehow points to the MIDDLE of the location in question (udg_rect08), can anyone shed any light as to how to properly randomize the respawn point of this hero?
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top