Action when unit enters X distance away from another unit

GFreak45

I didnt slap you, i high 5'd your face.
Reaction score
130
need more info, units b is a unit group? unit type? specific unit? spell C is cast by who? targeting what? what type of spell? is A a specific unit, a unit type, a unit from a group?

Please elaborate :/
 

smileyguyx

Member
Reaction score
1
A and B are unit types
Spell C is cast by Unit A targeting the position of B
i want there to be a various amount of spells s im using an ability array
if you need more info just ask
thanks
 

Slayerxx

You can change this now in User CP.
Reaction score
3
Trigger:
  • Cast Abllity
    • Events
      • Unit - A unit comes within 100.00 of Unit A
    • Conditions
      • (Triggering unit) Equal to Unit A
    • Actions
      • Unit - Order Unit A to Attack-Move To (Position of Unit B)


This is the basic way i have done, I have a map were a issue an attack-move order and the units have used there ability/Spells.
 

vypur85

Hibernate
Reaction score
803
The weakness with Unit comes into range is that it doesn't give you the 'Unit being entered to' event response. Only has 'Entering unit' (or Triggering unit, which is the same).

I would suggest a periodic event.
Code:
Event
 Every 0.50 seconds
Condition
Actions
 Set UNITGROUP = Unit within 100.00 of (Position of YourHeroUnit) matching (Matching unit) belongs to an enemy of Owner of (YourHeroUnit)... etc
 If then else
   Condition
      Number of units in UNITGROUP Greater than 0 <-- [I]Integer Comparison[/I]
   Then - Actions
      Set UNITVARIABLE = Random unit in UNITGROUP
      Unit - Order YourHeroUnit do something to UNITVARIABLE
   Else - Actions

Something like the above.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      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