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! I want to ask what Variable i need to use the event 'A unit comes within DISTANCE of Unit'? I tried with Unit variable, but it wasn't working... Please help me! +rep for reward!
You need additional trigger for that operation.
Its all about adding event to another trigger.
TRIGGER 1
Events
Map Initialization
Conditions
<stuff here>
Actions
Set importantUNIT = (triggering unit)
<stuff here>
Trigger - Add to TRIGGER 2 the event (Unit - A unit comes within 256.00 of (importantUNIT))
TRIGGER 2
Events
Conditions
<stuff here>
Actions
<stuff here>
As you can see, second trigger has no event event at first, but after trigger 1 runs, it will have new event - which normaly can not be added. So now it looks like this:
TRIGGER 2
Events
Unit - A unit comes within 256.00 of (importantUNIT)
That event just work if the "Unit" is placed on your map not created by triggers after
Then, i think this will work as same as the result of that event:
Trigger 1
Events
Time - Every 0.40 seconds of game time
Conditions
(Number of units in (Units within X range of (Variable Y set to the position of the unit you want to check if there's any unit nearby)))) greater than 0
Actions
Action blah blah..
That's it, Remember to clear the Variable Y (leak)
Well, i think this would work too spinnaker. And Explain:
Condition: use Integer Comparison for that
Variable Y you could set it in a trigger that use Map Initialization
Edit: Seems to be i'm not alone
Edit 2: sorry, edit the trigger again
Edit 3: a little explain
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.