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!
Hello. I am trying to make buildable traps. I have a worker called security master, who can build circle of power, which is invisible, and when an enemy unit steps on it it should trigger the trap. But I don't know how to make it work. I need help.
I would prefer much differend thing. Btw D0W3R, your triger leaks location. Things that leaks
@Wolwy5 Trap triggers when enemy approaches it yes? Basically is means that unit is really close to the trap.
When you build a trap, add it to TrapGroup.
get trap
Events
Unit - A unit finishes construction
Conditions
(Unit-type of (Constructed unit)) Equals to <trap-unit here>
Actions
Unit Group - Add (Constructed unit) to TrapGroup
Trigger - Turn on loop <gen>
Loop trigger:
loop
Events
Time - Every 0.2 seconds of game time
Conditions
Actions
Unit Group - Pick every unit in TrapGroup and do Actions
Loop - Actions
Set tempu = (Picked unit)
Set p = (Position of tempu)
Custom script: set bj_wantDestroyGroup = true
Unit Group - Pick every unit in (Units within 25 of p matching (<condtions here, like if (Matching unit) isn't Building type, if it's alive and ofcourse if it's enemy ;) >)
Loop - Actions
If (All conditions are true) then do (Then - Actions) else do (Else - Actions)
If - Conditions
(Picked unit) Not equal to No unit
(tempu is in TrapGroup) Equal to True
Then - Actions
// stuff here refered to traping target
Unit - Kill tempu
Unit Group - Remove tempu from TrapGroup
If (All conditions are true) then do (Then - Actions) else do (Else - Actions)
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.