This is a script I made that will revive trees that die for some reason. Whether it be a peasant picking at it or a spell that destroys trees like flame strike.
function RegrowTrees takesnothingreturnsnothing localdestructable tree=GetDyingDestructable() call TriggerSleepAction(10) call DestructableRestoreLife( tree, GetDestructableMaxLife(tree), true) set tree=null endfunction
function Int_Tree_Revive takesnothingreturnsnothing call EnumDestructablesInRect(GetPlayableMapRect(), null, function Trig_Int_Tree_Revival) endfunction
___________
I will add a test map later
__________________
Last edited by Hero12341234; 10-02-2007 at 10:13 PM..