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

N> Help with trap spell.

Status
Not open for further replies.
Level 2
Joined
Jul 30, 2008
Messages
17
what i want to happen is that when an enemy goes near my trap. it activates. for now im having trouble finding the right event. x.x
 
Level 10
Joined
Jun 16, 2007
Messages
415
That isn't exactly the smartest way. The easiest way would be to take an already existing 'trap' spell like goblin mines or ward and then to remove the effects of that ability. Say if you take the goblin mine spell, set damage to 0, so that it doesnt actually have an effect. Then set detonation radius to your desired radius.

This way the dummy trap will die if a unit comes within detonation radius. You then simply use the Unit - Unit Dies event to capture this moment and then pick all enemy units within X range of Triggering Unit to get the units that set off the trap.
 
Level 4
Joined
Nov 9, 2008
Messages
112
create a explode mine ability with no damage
and try


event -unit dies

cond -triggering unit equal to (your trap)

act -(your Action)


action ex: pick enemy unit at XXX range from (your trap) and do your what you want to do
 
Status
Not open for further replies.
Top