• 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!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Target area abilities

Status
Not open for further replies.
Level 6
Joined
Apr 23, 2008
Messages
263
How do you know what units has been hit by a target area ability?

is the target area a circle or a square? or something in between?
or is it possible to just use target unit of ability being cast?
 
Level 6
Joined
Jan 27, 2007
Messages
208
Its triggered ability, or its just original ability like Rain of Fire?

If it is triggered ability, maybe some kind like this?
  • Set tempPoint = (Target point of ability being cast)
  • Set tempGroup = (Units within 500.00 of tempPoint matching (((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True))
  • Unit Group - Pick every unit in tempGroup and do (Actions)
    • Loop - Actions
      • Blablabla
  • Custom script: call RemoveLocation(udg_tempPoint)
  • Custom script: call DestroyGroup(udg_tempGroup)
And enemy units who has been hit by the spell is in tempGroup
 
Level 6
Joined
Apr 23, 2008
Messages
263
Its triggered ability, or its just original ability like Rain of Fire?

If it is triggered ability, maybe some kind like this?
  • Set tempPoint = (Target point of ability being cast)
  • Set tempGroup = (Units within 500.00 of tempPoint matching (((Matching unit) belongs to an enemy of (Owner of (Triggering unit))) Equal to True))
  • Unit Group - Pick every unit in tempGroup and do (Actions)
    • Loop - Actions
      • Blablabla
  • Custom script: call RemoveLocation(udg_tempPoint)
  • Custom script: call DestroyGroup(udg_tempGroup)
And enemy units who has been hit by the spell is in tempGroup

yes but wouldnt this pick the units in a circle? the area-thing doesnt seem like a circle to me but i dont know if it is.
 
The area of effect is a circle with a center and a radius. l0git3c's method works well, as (Target point of ability being cast) will be the center of the circle (and is GUI-leakless :D)

In the case of Frost Nova, for example, use (Target unit of ability being cast), as the center of the circle would be that unit.

OFF: Damn it, my new keyboard is horribe!
 
Level 6
Joined
Apr 23, 2008
Messages
263
well thanks all then :D

edit ~ rep goes to Saia_djinn for answering my question in the best way

edit again ~ marcelos was better but saia was first xD

3rd edit ~ knowing who to give rep is a major problem for me
 
Status
Not open for further replies.
Top