How do I connect multiple regions to make a region?

Status
Not open for further replies.
Level 8
Joined
Feb 20, 2007
Messages
338
I have several regions laying side by side creating a U shape.

I want an action to take place with a unit enters any of those regions.

I want another action to take place when the unit leaves those regions, except if leaving one of the regions place the unit in one of the connected regions.

In other words:
WEU has rects which can be formed to make a region, how do I do that with the regular WE?
 
Level 11
Joined
Aug 25, 2006
Messages
971
A region in GUI (Unless your using WEU) is actually a rect. In GUI it uses rect's instead of regions. A rect is 2 points (Which it uses to generate a square) while a region is a bunch of rects.
 
Level 8
Joined
Feb 20, 2007
Messages
338
Answer: JASS, and the function RegionAddRect.
JASS:
native RegionAddRect            takes region whichRegion, rect r returns nothing

Thanks for the script.

A region in GUI (Unless your using WEU) is actually a rect. In GUI it uses rect's instead of regions. A rect is 2 points (Which it uses to generate a square) while a region is a bunch of rects.

I wasn't certain about this. The region tool pallet calls them "regions" in WE and in WEU they are called rects. I had used the WEU to create regions out of rects before, but that is a WEU add-on function and does not work in WE as a GUI trigger script.

If either of you know, can I take a WEU advanced script, convert it to custom script then use it in WE? I'm assuming that WEU extra functions were in jass and just made to look like GUI.
 
Level 11
Joined
Aug 25, 2006
Messages
971
Yes, you can. WEU functions labeled 'advanced' actually call a function which is stored under the custom script location of the map. Other functions WEU adds on are calls to other jass functions which weren't added to normal gui. By converting the an extended line of GUI to custom script, you will allow normal WE to be able to properly open it.
 
Status
Not open for further replies.
Top