• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Cannot get region to move

Status
Not open for further replies.
Level 2
Joined
Aug 14, 2005
Messages
16
I'm trying to make a region center itself upon a structure once it is constructed. The region will not move, the events and other actions are fine. I have set the region as a variable, nothing happens. At first I thought it might have to do with a weather effect for the region so I removed that also but to no avail. I've made a variable for the point of the constructing structure and to have to region move to that point once the structure is completed. In fact, here is the script, I can't see what is wrong with it, hopefully it's something stupid:

Region - Center MissileDefP1 on (Position of (Triggering unit))

There is no waiting period, so I don't see why I would need a variable for the unit, etc. Any ideas? I initially had an array but even switched done to singular variables for each player hoping that might do something. Very frustrating.

Thanks
 
Level 2
Joined
Aug 14, 2005
Messages
16
I at one point changed it to constructed unit but that didn't seem to have any effect either. The event that triggers the triggers is for a unit being constructed, it runs through the conditions, which check out, because other actions take place but the region will not move.
 
Level 2
Joined
Aug 14, 2005
Messages
16
Once a certain structure is built, it kills all units of a certain type within the area. I can't get this to work for whatever reason... I'm moving other regions in the map with no problems, I don't know. Here is the full text of the trigger:

P2 Set Defense Copy
Events
Unit - A unit Finishes construction
Conditions
(Unit-type of (Triggering unit)) Equal to Missile Defense Generator
(Owner of (Triggering unit)) Equal to Player 2 (Blue)
Actions
Region - Center MissileDefense[2] on (Position of (Triggering unit))
 
Level 2
Joined
Sep 12, 2006
Messages
23
i have no clue what the problem is, but maybe instead of centering the region on the constructed unit, u can store the unit in a variable and do unit group-pick all units in a X radius of your unit and do action kill unit...

If you don't wanna do that, try modifying your trigger to find out what's going wrong. for example add unit-kill(triggering unit) to your actions to see if the unit you want the region to be centered upon is in fact the triggering unit? or other stuff of that nature
 
Level 2
Joined
Aug 14, 2005
Messages
16
The only problem with the trigger was the move region part, but I have solved the problem by simply using a unit and killing all units within a radius. I still have no idea why the region wouldn't move, but I'm not going to dick around with it anymore.
 
Level 1
Joined
Oct 1, 2006
Messages
2
Because I'm bored I will explain the features of a region and it may help you understand what is happening:

Firstly there are two parts to a region: The boundary and the region itself. The boundary is the original area of which the region is situated, ie a unit enters "so and so" region and this and that trigger is triggered.
The region is the actual object itself and makes up all the data of the region, ie where it is located, its size etc.
Because the region holds all the data it is used for the placement of other objects such as units or positions of where a unit should go (and other stuff along those lines). The boundary however is mainly only used for triggering events (may be used for other stuff, but I cant think of them right now).

For some reason when you move a region it only moves the region and not the boundary, so basically the region[/u] has actually moved, but its original coordinates (boundary) are still the same. Therefore to trigger the event asscossiated with that region you must enter the boundary not the region[/u] (which if you haven't heard it enough, is still in its original position). However if you use a trigger to create a unit in that region, it will be created at the position of the region.


:D Hopefully that made some sense.. hopefully...

Cheerio
 
Status
Not open for further replies.
Top