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!
As the title says... I currently don't know the lines required for this and I was hoping someone could help me out. Oh and I am asking about this in JASS.
Example of adding and removing a rect to a region. (you can add as many rects as you want to your region)
JASS:
local region r = CreateRegion() // create region
call RegionAddRect(r, yourRect) // adds "yourRect" to your region
call RegionClearRect(r, yourRect) // removes "yourRect" from your region
call RemoveRegion(r) //removes the region
set r = null
There are also events for region, enter/leave region:
In GUI you could say Region == Rect. (there only may exist 1 rect for 1 region)
In JASS you can't, because you can manipulate the region by yourself with adding multiple rects or single coordinates to your region.
You can't directly define the size of a region, because a region is just the sum of all rects/coordinates you add to your region.
But you can define the size of the rects, that you add to your region:
native Rect takes real minx, real miny, real maxx, real maxy returns rect
And you asked how to check if a unit is in a region:
native IsUnitInRegion takes region whichRegion, unit whichUnit returns boolean
Hope it helped, but now I don't quite understand. Do you suppose to work with jass or with gui with these regions?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.