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

Region Sides problem

Status
Not open for further replies.

SpasMaster

Hosted Project: SC
Level 23
Joined
Jan 29, 2010
Messages
1,969
Hello, Hive.

I've experienced this really weird problem... I am making a Castle Fight style map where units automatically attack-move against the opponent's base. I utilise several <A unit enters region> event triggers for the auto-movement system to work. The problem is that whenever a unit enters a region from North or East, it does not perform its given order to attack-move to the next point. The order is given in the exact same region within the exact same trigger and it works from South and West. I have made a debug message, which appears no matter what side the unit enters from, but it does not execute the attack-move order. Here is what the trigger looks like:

[trigger=""]Additional Order Attack Top Red Attack
Events
Unit - A unit enters Attack Point Red 1 <gen>
Conditions
((Triggering unit) is A structure) Equal to False
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
Or - Any (Conditions) are true
Conditions
(Owner of (Triggering unit)) Equal to Player 1 (Red)
(Owner of (Triggering unit)) Equal to Player 2 (Blue)
(Owner of (Triggering unit)) Equal to Player 3 (Teal)
(Owner of (Triggering unit)) Equal to Player 4 (Purple)
Then - Actions
Game - Display to (All players) the text: Order
Set Top_Mid = (Center of Attack Point Mid Top Point <gen>)
Unit - Order (Triggering unit) to Attack-Move To Top_Mid
Custom script: call RemoveLocation (udg_Top_Mid)
Else - Actions
[/trigger]

Also attaching a video:

 
Level 9
Joined
May 21, 2014
Messages
580
There are other threads regarding this matter. It might have been answered by others as well. Some say it must have something to do with Creep - Guard Distance or whatever, but I'm not sure; I just read it. You can try googling about it.

I am sorry if I cannot link you some threads; data cap limit reached, resulting to a lower speed Internet. What a dumb law...
 

SpasMaster

Hosted Project: SC
Level 23
Joined
Jan 29, 2010
Messages
1,969
There are other threads regarding this matter. It might have been answered by others as well. Some say it must have something to do with Creep - Guard Distance or whatever, but I'm not sure; I just read it. You can try googling about it.

I am sorry if I cannot link you some threads; data cap limit reached, resulting to a lower speed Internet. What a dumb law...

Isn't Guard distance related to Neutral/AI controlled units only? The units in the example I have given are owned by me. I also looked through google and I can't see any reports for units not recieving orders when entering from east/north.
 
Level 26
Joined
Aug 18, 2009
Messages
4,097
Not that it would be visible in this trigger but when you have an enter/leave event, it Clones your GUI rect into a jass region and extends the top and right edge by a cell's width (32). That's because the iterator is faulty, it includes the last coordinates but that already makes up a new cell/row of cells.

A common mistake is to check via condition if the unit is within a rect in an enter/leave event of the same rect.
 
Status
Not open for further replies.
Top