| 11-17-2006, 09:47 AM | #1 |
Hi :) I tried to move a rect. For the test and debug, i create a unit in center of the rect. I create the unit before move : unit is in the right place I move the rect and test to create unit : unit is in the right place So my rect moved very well. My purpose is to have a trigger with this event : "Unit enters Rect" ...with as the "Rect", my moved rect. And... game can't detect the unit entering in the rect (after the rect moved ( it works before it moved )) |
| 11-17-2006, 11:18 AM | #2 |
> a trigger with this event : "Unit enters Rect" That doesn't work as you think it should. The event is registered with whatever size and position that region has at the time of registration (usually at map loading). It never changes again... |
| 11-17-2006, 11:43 AM | #3 |
The way the GUI unit enters rect event works is, it creates a region and adds the rect to it, then registers the event for this region (because there are no rect events in JASS). You could instead use a region, adding and removing rects as appropriate. |
| 11-17-2006, 12:41 PM | #4 |
It never changes.. but the creation in this rectangle works. I'll try with region. |
| 11-17-2006, 01:59 PM | #5 |
The GUI event function creates a new region and registers the event to it. The rect isn't affected in any way, so moving the rect still affects the rect. It doesn't affect the region created by the event registration function. |
