• 🏆 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!

Weird bug with region

Status
Not open for further replies.
Level 11
Joined
Jan 23, 2015
Messages
788
I have a very weird bug with a region of mine. When I order something to use that region with triggers, like when I make a unit move to it, it moves to a completely different area, where there's even no regions.. I thought it may be cause of the AI, but I made a Minimap Ping, and it flared on the same area. It's like the region somehow moved itself when the game started.. Do you know how can I fix this?
 
Level 2
Joined
Jan 2, 2013
Messages
24
Are you familiar with jass? You can use this code:

JASS:
call DisplayTextToForce(GetPlayersAll(), R2S(GetRectCenterX(udg_**regionname**)) + " " + R2S(GetRectCenterY(udg_**regionname**)))

Use the custom script action and put it at the end of your trigger, but substitute the name of your region variable. This will give you (in game when executed) the coordinates of the center of the region, so you will at least be able to know if the region has been moved by some other trigger by looking at the coordinates in the editor map. Otherwise, you should check if may be you made some mistakes in loading/saving the region.. Is it used in other triggers? Posting the code could be helpful.
Hope this helps!
 
Level 11
Joined
Jan 23, 2015
Messages
788
I've tried with other regions and it was the same, then I tried with a region but without a region variable, and I found out that the trigger which is supposed to set the region variables happens after I issue the unit to use the region, so, yea, that was the whole problem, thank you
 
Status
Not open for further replies.
Top