- Joined
- Jul 2, 2012
- Messages
- 5
Using World Editor version 1.34
---
Solution - Each GUI Region is a JASS
What's confusing is that, despite
---
Suppose I have a region named "My Region" that I created in the GUI with the Region palette. How can I reference this region or its
I see that I can easily reference the region in a variety of GUI trigger commands, such as the 'A unit enters a Region' event, for example:
Ultimately, I need to reference a
Again, the Region name is known beforehand - I just need a way to reference it and use it as a native object.
---
Solution - Each GUI Region is a JASS
rect
. Each GUI Region (JASS rect
) can be referenced in JASS with a generated global variable of the form gg_rct_REGION_NAME
, where "REGION_NAME" is the Region's name as it appears in the GUI Region Palette and Object Manager, just replace any spaces with underscores. What's confusing is that, despite
region
and rect
being two different native objects in JASS, a GUI Region is in fact a JASS rect
.---
Suppose I have a region named "My Region" that I created in the GUI with the Region palette. How can I reference this region or its
rect
(s) in JASS or Lua?I see that I can easily reference the region in a variety of GUI trigger commands, such as the 'A unit enters a Region' event, for example:
-
Untitled Trigger 001
-
Events
-
Unit - A unit enters My Region <gen>
-
-
Conditions
-
Actions
-
Custom script: print('hello world')
-
-
Ultimately, I need to reference a
rect
(region) for use with this common.j method: GroupEnumUnitsInRect
Again, the Region name is known beforehand - I just need a way to reference it and use it as a native object.
Last edited: