• 🏆 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!

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