• 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.

tree respawn system

Status
Not open for further replies.
Level 13
Joined
Sep 29, 2008
Messages
672
can someone make me a tree respawn system that when a hero is near it won't respawn, I just need it's aoe in checking a nearby hero and time configurations. and please can you make it as efficient as possible and works in 1.20+ patch.

+rep to those who help. too busy to look for one. xD
 
Rough jass, i dont have we available ritt nao.

JASS:
function Callback takes nothing returns nothing
  local timer T = CreateTimer()
  if DistanceBetweenPoints(GetDestructableLoc(YourDest), GetUnitLoc(GetEnumUnit())) != your distance then
  call ReviveTree(or whatever func name is) (YourDest)
else
  call StartTimer(T, false, 20.00, function Callback)
endif
endfunction

function TriggerActions takes nothing returns nothing
  call EnumUnitsInRange(GetDestructableLoc(TrigDest)), 300.0, function Callback)  
endfunction

function inittrig takes nothing returns nothing
  call TriggerRegisterDestructableDeath(Thistrig, any destryctblr?)
  call TriggerRegisterAction(Thistrig, function TriggerActions)

sorry for errors, and i cant test it.
 
Status
Not open for further replies.
Top