• 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.

Picking units within "X" range of point (not region)?

Status
Not open for further replies.
Level 4
Joined
Jan 29, 2007
Messages
98
Hello!

I just started working with the Galaxy Editor, and I find the Data Editor part completely inunderstandable, so I want to make a simple spell without the use of any modifications of the Data fields ( except for the creation of a new spell of course ;) ).

And I also want to use the Galaxy language, and not the GUI as I'm more used to scripting than clicking (I'm coming from WC3 and things weren't as complicated then XD) since the GUI also has become much more advanced.

So, to the point then, how would I go about in Galaxy or GUI (preferably Galaxy) to set a variable (type=unit group) to all enemy units withing 100 range of a single point, in a circle around?
 
Level 11
Joined
Jul 20, 2004
Messages
2,760
Depending on what you may want to do, there is a special Effect in the Data Editor called "Search Area", that performs a search around a target point. No need for scripting for something so easy.

If you still want to script, there is a circular type of region you might use. The natives you seek are :
- UnitGroupFilterRegion - to get units in a certain region.
- RegionCircle - to convert a circular into a circular region.

Careful! Ranges in StarCraft II are far smaller than in Warcraft III. A 500 range is considered pretty much global. Normal spell casting ranges vary from 3 (rather close) to 7 (quite far).
 
Status
Not open for further replies.
Top