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!
Hi everyone..I'm working on map..witch will be a small arena and outside will be lava...and if someone entires the lava to take 130 damage per second and if he entires the arena to stop damage....
You can do it that way too, but I suggest vise-versa when you leave the arena start taking damage until you enter it again.
The damaging can be done by a number of ways(rain of fire, shadow strike, a timer(the best but also the most complicated way) ).
Hi everyone..I'm working on map..witch will be a small arena and outside will be lava...and if someone entires the lava to take 130 damage per second and if he entires the arena to stop damage....
What you need to do is have a periodic trigger that goes off every second. Every second, pick all units on the map, and if they're standing on the lava terrain type (assuming there's only one), then deal damage to them. It'd also be a good idea to clean up memory leaks in a trigger like this because it will go off every second. Here's an example of how the trigger could be done:
Lava Damage
Events
Time - Every 1.00 seconds of game time
Conditions
Actions
Set tempGroup = (Units in (Playable map area))
Unit Group - Pick every unit in tempGroup and do (Actions)
Loop - Actions
Set tempLocation = (Position of (Picked unit))
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Terrain type at tempLocation) Equal to Dungeon - Lava
Then - Actions
Unit - Set life of (Picked unit) to ((Life of (Picked unit)) - 130.00)
The tempGroup (Unit Group) and tempLocation (Point) variables are used to help prevent memory leaks in the trigger. While you don't need them for the trigger to function properly, it's definitely a good idea to have them in there.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.