HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Does region have any side-effects?

07-29-2008, 04:25 PM#1
ToukoAozaki
I've been using regions for a long time, but I couldn't find much information about it.

Pros
GetTriggeringRegion() saves a lot of work.
IsUnitInRegion() works really decent, unlike buggy RectContainsUnit().
Shape is not limited to rectangles.

Cons
???

If you have any idea, please let me know.
07-29-2008, 05:56 PM#2
DioD
rect if struct of 4 reals.

region is object
07-29-2008, 05:58 PM#3
Silvenon
Well, you can't use regions in GUI, only rects which are for some strange reason also named regions. Also, it's kind of hard to make regions, because you have to create rects....... but in general, yes, they don't have any side-effects.
07-30-2008, 01:07 AM#4
ToukoAozaki
Quote:
Originally Posted by DioD
rect if struct of 4 reals.

region is object

AFAIK rect is also an object, and so is location. Am I wrong?
07-30-2008, 07:58 AM#5
DioD
Region have no coordinates
07-30-2008, 01:39 PM#6
Vexorian
Quote:
Originally Posted by DioD
Region have no coordinates
It is still an object...
07-30-2008, 02:19 PM#7
DioD
Rect is not object, this is data handle, like location.

Everything that cannot affect gameplay by it existance in any way is not object - its data.

Timer = can execute some function
Region = can register leave or enter events
Unit = have mass events on it
07-30-2008, 02:45 PM#8
ToukoAozaki
Quote:
Originally Posted by DioD
Rect is not object, this is data handle, like location.

Everything that cannot affect gameplay by it existance in any way is not object - its data.

Timer = can execute some function
Region = can register leave or enter events
Unit = have mass events on it

That's up to the definition of the object. It may vary. In a programmer's sense, anything instantiable could be an object.
07-30-2008, 04:34 PM#9
Vexorian
Quote:
Originally Posted by DioD
Rect is not object, this is data handle, like location.

Everything that cannot affect gameplay by it existance in any way is not object - its data.

Timer = can execute some function
Region = can register leave or enter events
Unit = have mass events on it
Regions trigger enter events. If timers are an object under that definition regions would as well be objects.
07-30-2008, 07:22 PM#10
DioD
rect != region