| 04-02-2007, 05:52 PM | #1 |
At the start of the map I set Region1 to variable Regions[1]. Then when a unit walks to a different region, that teleports the unit, moves the camera and sets a preplaced unit as Unit[1]. After the unit is set, I use Region - Move Region to move the region to Unit[1]. Now this is the part that is not working. Region[1] is a region that starts a dialog. I've tested the region before it moves and it starts the dialog, but not after it's moved. There is a If/Then/Else that is part of the dialog trigger, but in the Then and Else section I put something to test if that is the problem, but it's not. Then I double checked to see if the region really moved, so I made it center on the region after the region is moved, but again that's not it. Any ideas? |
| 04-02-2007, 06:04 PM | #2 |
what about posting the triggers ? |
| 04-02-2007, 06:11 PM | #3 |
The world editor is a pile of junk in some ways. You see, there are actually 2 types of regions: Rects (what you place in the editor. Rectangles) and Regions (more complex shapes made of lots of rects) JASS:function TriggerRegisterEnterRectSimple takes trigger trig,rect r returns event local region rectRegion = CreateRegion() call RegionAddRect(rectRegion, r) return TriggerRegisterEnterRegion(trig, rectRegion, null) endfunction That is the function that is called to register a "unit enters region" event. It takes a rect (the thing you place in the editor), adds it to a local region, and registers a unit enters region event. So, when you move the rect you created, you don't move the region. So the region that was created stays in the same place. |
| 04-04-2007, 06:00 PM | #4 |
Sorry for reviving a old topic but I keep forgetting to check on the ones I create. I don't understand what I have to do. |
