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

[JASS] Create units in the confines of a square w/o rects

Status
Not open for further replies.
Level 14
Joined
Jul 26, 2008
Messages
1,009
Alright I'm wondering two questions, both related. The first:

How do you find the X and Y coordinates of a location on the map while in the world editor?

This willl help me do the next part, which is only create a unit in the confines of a square.

I know it's basically you just set each point of the square and it only creates it in that confine, but I don't remember where I saw it. It uses >= and <=. Real easy stuff.

I think it just generates a Random X and Random Y. So long as the designated X is less than or equal to 4 and greater than or equal to 2, and the designated Y is <= 4 and X >= 2 then it's fine. There's a bit more to it, I know that.

Reason is I don't want to use a huge rect to cover 75% of the map when there's a lot of other rects already on the map. Thanks for help :D
 
point your mouse over some point and you can see the x/y coords in the bottom-left corner

the yellow regions are 512 x 512 divided up into 4 x 4 smaller ones which are divided into 4x4 even smaller ones themself so they are 128 x 128 and 32 x 32 in size
be careful with changing map bounds after you made your triggers with these points cause it might get messed up
these grids will be enabled by pressing 'g' or with "View - Grid - Small" you can also change their color if you don't like them
an average tree has a size of 64 x 64
 

Attachments

  • screenshot.jpg
    screenshot.jpg
    1.5 MB · Views: 119
Level 14
Joined
Jul 26, 2008
Messages
1,009
Sorry, I should specify. It's a bit more of a World Editor Helpzone question though. I'm talking about hovering my mouse of a specific area on the Terrain Editor and getting the X Y of it, or at least something similar so I can get the specific X Y of the four corners of where I want this square to be.

@DarkG4ndalf: Oh just saw your post. Is that really the X Y of the map? Is a 256x256 map really 16,000 long by 16,000 wide? Well . . . I guess that does make sense when I think about spell area and range coordinates.
 
Status
Not open for further replies.
Top