| 08-14-2008, 05:52 AM | #2 |
The code below will explain everything. Blizzard.j://=========================================================================== function TriggerRegisterEnterRectSimple takes trigger trig, rect r returns event local region rectRegion = CreateRegion() call RegionAddRect(rectRegion, r) return TriggerRegisterEnterRegion(trig, rectRegion, null) endfunction When you register "enters region" event, basically a region based on the rect you provided is created and then registered to the region event. This means the region actually responsible for the event won't change even if you change the source rect. In order to achieve what you want, the most practical way is to create and assign a global region variable, then register this region to the event. Whenever you need changes, clear and add the desired rect to the region. |
| 08-14-2008, 11:42 AM | #3 |
For GUI, give the Ward unit an attack and trigger it from that. |
