HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Changing regions after usage in EnterRegion event

11-10-2004, 01:29 AM#1
AIAndy
Surprisingly changing a region that you used in a EnterRegion event does change the behavior of the event.
An example:
You create an EnterRegion trigger and store that region (not the rect) in a variable. Now whenever you change that region by adding or removing rects or cells, you do change for what region the trigger fires without recreating the trigger.
11-10-2004, 01:24 PM#2
Vexorian
Quote:
Originally Posted by AIAndy
Surprisingly changing a region that you used in a EnterRegion event does change the behavior of the event.
An example:
You create an EnterRegion trigger and store that region (not the rect) in a variable. Now whenever you change that region by adding or removing rects or cells, you do change for what region the trigger fires without recreating the trigger.
I thought this was well known? the only reason it is different with rects is because the event is registered for a region , another handle very different to the rect
11-10-2004, 03:49 PM#3
AIAndy
Well, I formerly assumed that trigger events used a copy of the objects and not only a reference to the objects you pass it. But it seems like I was wrong there.
11-13-2004, 01:58 AM#4
Cubasis
This is news to me.

Cuz as AIAndy, I too thought that events took copies of their attached objects. I even thought I tested it on some event (not EnterRegion), maybe it depends on the event.

~Cubasis