• Check out the results of the Techtree Contest #19!
  • Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

Region Sides problem

Status
Not open for further replies.

SpasMaster

Hosted Project: SC
Level 25
Joined
Jan 29, 2010
Messages
2,018

Sunken City

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:

 
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...
 
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.
 
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.
Back
Top