HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Regions?

07-03-2006, 11:35 AM#1
Sharingan
Hmm...
On the one hand, there are Rects, which are, imo circles with a center location within a map.
Now how are Regions defined?
Is it possible to make Regions that have more than 3 Corners?
Like, I would want to create a region in a forest, but that forest is neither round or whatever, but rather has 100 Million borders and corners...
What to do?
07-03-2006, 11:52 AM#2
PipeDream
Regions are probably garbage. If you want to define complex shapes it is almost certainly better to do it yourself. If you explain what sort of operations you need we can design something. Try telling a story of a typical situation.

BTW, the internal representation of rects is position of lower left and upper right corners.
07-03-2006, 05:52 PM#3
aquilla
What GUI does on when you use for example unit enters region is it creates a region and adds the rect to it. GUI would just create a new region for each rect, where in JASS, you can add several rects to the same region

Or, if you wish, just add each cell :)

Collapse JASS:
native Rect                     takes real minx, real miny, real maxx, real maxy returns rect
native MoveRectTo               takes rect whichRect, real newCenterX, real newCenterY returns nothing
native RegionAddRect            takes region whichRegion, rect r returns nothing
native RemoveRect               takes rect whichRect returns nothing

//

native RegionAddCell           takes region whichRegion, real x, real y returns nothing
07-04-2006, 01:29 AM#4
Vexorian
Rects are rectangles not circles.

Regions are a set of points, and you can add rects or the points you want.
07-04-2006, 08:06 PM#5
dafatalgigabyte
I can't seem to figure out these regions. Once I get an idea, something comes up that leads me to a dead end, so I need some help please, and thank you in advance.

In Warhammer 40,000 you can have area terrain on the map that gives cover to models(individual solders) in an area of usually non-rectangular shape. How am I supposed to make this area of variable shape and size as one region that checks if a model entered it without requiring, for example, unit enters forest1,2,3,etc.

Models can also take cover behind fences or their natural counterpart both of which have good chances of going diagonally, something that is tedious with rects.

And also the template range of a weapon uses a template shown below:
Click image for larger version

Name:	FlameTemplate.jpg
Views:	4
Size:	7.1 KB
ID:	8826
This will be directed in a variable direction during the course of the game. I think if I could make this work, I can make any region work.

Some specific help or a push in the right direction will be appreciated.
Attached Images
File type: jpgFlameTemplate.jpg (7.1 KB)