• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Event Response to Unit comes within range

Status
Not open for further replies.
Level 8
Joined
Jun 13, 2010
Messages
344
Hi
I want to make a trigger where an action will begin when a unit comes within range of a circle of power.
Now what I want is an event response reffering to the circle of power.
What I have in mind is like this:

  • They Brought the Tinder Integer
    • Events
      • Unit - A unit comes within 50.00 of Circle of Power 0258 <gen>
      • Unit - A unit comes within 50.00 of Circle of Power 0199 <gen>
      • Unit - A unit comes within 50.00 of Circle of Power 0181 <gen>
    • Conditions
      • ((Entering unit) is A Hero) Equal to True
      • (Owner of (Entering unit)) Not equal to Player 12 (Brown)
      • (Owner of (Entering unit)) Not equal to Neutral Passive
      • (Owner of (Entering unit)) Not equal to Neutral Hostile
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
        • Then - Actions
        • Else - Actions
In the If/Then/Else I want the condition to be something like this:
If the unit which is approuched is equal to Circle of Power 0258

Then do actions.

How can I retrieve the information to respond?
I have looked through unit conditions and boolean conditions. I don't find a match.

Or do I really have to make 3 seperate triggers? 1 for each and skip the conditions?
 
Level 14
Joined
Nov 17, 2010
Messages
1,265
Entering unit only works for the event- a unit enters a region. For a unit coming within range of another unit you need to use triggering unit to refer to the unit coming within range. As far as I know there is no way to refer to the other unit.

I would make three regions and detect when a unit enters a region. You should be able to use an if then else to determine which region was entered
 
Status
Not open for further replies.
Top