detect range between generic units

LightChaosma

New Member
Reaction score
60
how do i detect if a unit becomes within range of a not preset unit. i've tried using aura and immolation, yet with no effect.

for aura and immo i used the following trigger:

Code:
roots
    Events
        Unit - A unit Starts the effect of an ability
    Conditions
        (Ability being cast) Equal to Permanent Immolation (Neutral Hostile 1) (Neutral Hostile 1)
    Actions
        Game - Display to (All players) the text: 4  4534433541341  4...
 

Fluffball

Well-Known Member
Reaction score
35
1.) Passive abilities don't trigger "Casting Abilities" in the Events

2.) Unit is Within (Range) of Unit
 

Templarion

Member
Reaction score
8
Code:
Unit Group - Pick every unit in (Units within 512.00 of (Position of (Triggering unit))) and do (Actions)
    Loop - Actions

Is this what you are searching for? You could tell us what are you trying to do so we could help you more specifically.
 

LightChaosma

New Member
Reaction score
60
i'm trying to make it so that when a unit becomes within 75 range of a not preset unit, so a unit that has to be made in-game, there is a 2% chance of a dummy casting entangling roots on them.

i have no problem with the actions, its just detecting when a unit enteres that area...
 

Templarion

Member
Reaction score
8
Can't you use this event?
Code:
Unit - A unit comes within 75.00 of <Unit>

You can't preset the in-game made unit but you can preset the heros, right? Or do the players control huge amount of units? If so, then I am out of ideas.

EDIT:
Actually, you could also use this Event:
Code:
Unit - A unit Is issued an order targeting an object
This requires that in-game made unit's acquisition range is 75 and it doesn't try to attack earlier than that.
 

LightChaosma

New Member
Reaction score
60
bump

i have an idea, though it will be increadibly inacurate, to set a 1-0 dmg attack with 75 range.........
 

Cloak_Master

Active Member
Reaction score
41
You can add the event to a trigger a unit comes within range of X with actions.

For example

Code:
events
A unit enters playable map area

conditions
unit type of entering unit = whatever

actions
add event to X the event a unit comes within 300 of entering unit
 

LightChaosma

New Member
Reaction score
60
that isnt a bad idea, lemme test that, if it works ill rep ya

thx man, it works. you got a +rep, just 1 question...

Code:
roots add location
    Events
        Unit - A unit Finishes construction
    Conditions
        (Unit-type of (Constructed structure)) Equal to Rooter
    Actions
        Trigger - Add to roots <gen> the event (Unit - A unit comes within 256.00 of (Constructed structure))


will this hold the data an entire TD? say 40 minutes or so, wont it be nesecary to store that unit in a variable?
 
General chit-chat
Help Users

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top