HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Setting Variables

08-13-2003, 03:46 AM#1
peekitup
I have a map where when a hero dies the game waits 4*X seconds. X is the level of the hero. I am guessing to do this you must use variables but I am having trouble setting them to the hero level. If you can, explain how to do this by stating exactly what the trigger editor would say.
08-13-2003, 04:00 AM#2
noobelite
i havent tried this but c if this works for u

revivetime1 is an integer variable
revivetime2 is a real variable

Events
Unit - A unit Dies
Conditions
((Triggering unit) is A Hero) Equal to True
Actions
Set ReviveTime1 = (Hero level of (Dying unit))
Set ReviveTime2 = (Real(ReviveTime1))
Wait (ReviveTime2 x 4.00) seconds
Hero - Instantly revive (Dying unit) at (Center of ReviveArea), Hide revival graphics