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!
The best way i know how is to set a local unit variable to the unit that enters the region, this does use a small amount of JASS but i will comment it as much as i can.
Untitled Trigger 001
Events
Unit - A unit enters KillRect <gen>
Conditions
Actions
Custom script: local unit EnteredU = GetTriggerUnit()
Wait 10.00 seconds
Custom script: if RectContainsUnit(gg_rct_KillRect, GetTriggerUnit()) == true then
Custom script: call KillUnit(EnteredU)
Custom script: endif
Custom script : set EnteredU = null
"local unit EnteredU = GetTriggerUnit()" sets a local variable to the entering unit. It must be a local to avoid any overwriting that may occur if this trigger is rerun.
The line " if RectContainsUnit(gg_rct_KillRect, GetTriggerUnit()) == true then" checks if the unit is still within the "kill rect".
And the final lines do the following ;
> Kill the entering unit.
> Ends the "If" condition
> Clears up any potential leaks.
You must edit the line
JASS:
if RectContainsUnit(gg_rct_KillRect, GetTriggerUnit()) == true then
for your regoin.
You must change "KillRect" to your killing regoin name [it is case sensative].
EG change it to ;
JASS:
if RectContainsUnit(gg_rct_RectThatKills, GetTriggerUnit()) == true then
I hope ive been helpful, if you have any problems just post and il see what i can do.
##edit##
I think there is in fact an easy GUI way, simply because i was being over cautious with the unit being overwritten. However this bug may well be evident as i have not checked over on this trigger.
Events
Unit - A unit enters Region 000 <gen>
Conditions
Actions
Wait 10.00 seconds
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Region 000 <gen> contains (Entering unit)) Equal to True
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.