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

[Trigger] Arena Damage?

Status
Not open for further replies.
Level 2
Joined
Jul 3, 2007
Messages
8
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.... :ugly:
 
Level 12
Joined
Apr 27, 2008
Messages
1,228
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) ).
 
Level 11
Joined
Oct 13, 2005
Messages
233
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)
            • Else - Actions
          • Custom script: call RemoveLocatoin(udg_tempLocation)
      • Custom script: call DestroyGroup(udg_tempGroup)
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.
 
Level 2
Joined
Jul 3, 2007
Messages
8
The map he would be coping is called "Warlocks".

Use wyrmlords wondurfully leakless trigger.

HURRAH!

btw wyrmlord is my idol (TUTORIAL!)

Wyrmlord is my idol too....cuz when i ask something he is always here...helping me...thanks wyrmlord !! :grin:
 
Status
Not open for further replies.
Top