• 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.

Move Orders

Status
Not open for further replies.
Level 24
Joined
Oct 12, 2008
Messages
1,783
  • General Kite
    • Events
      • Unit - A unit Is attacked
    • Conditions
      • (Owner of (Attacking unit)) Equal to Hostiles
      • ((Attacking unit) is A ranged attacker) Equal to True
      • (Random integer number between 1 and 100) Less than or equal to (Difficulty x 25)
      • (Percentage life of (Attacked unit)) Greater than or equal to (Percentage life of (Attacking unit))
    • Actions
      • Set Monstermod_Attacker = (Attacking unit)
      • Set Monstermod_Attacked = (Attacked unit)
      • Set Monstermove[1] = (Position of Monstermod_Attacker)
      • Set Monstermove[2] = (Position of Monstermod_Attacked)
      • Set TempReal = ((Default acquisition range of (Attacking unit)) / 2.00)
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Distance between Monstermove[1] and Monstermove[2]) Less than or equal to TempReal
        • Then - Actions
          • Game - Display to (All players) the text: TEST
          • Set Monstermove[3] = (Monstermove[1] offset by (Random real number between TempReal and (TempReal + 200.00)) towards (Facing of Monstermod_Attacked) degrees)
          • Unit - Order (Attacking unit) to Move To (Center of (Playable map area))
        • Else - Actions
      • Custom script: call RemoveLocation(udg_Monstermove[1])
      • Custom script: call RemoveLocation(udg_Monstermove[2])
      • Custom script: call RemoveLocation(udg_Monstermove[3])
Basically, a simple retreat function.
Problem is that it doesn't work.

The TEST text does show ingame, therefore it can be assumed that all the conditons are correct.
Ive double checked and there no other triggers that are interrupting this.
 
Level 24
Joined
Oct 12, 2008
Messages
1,783
What you mean with idles around, is it continue attacking or not?

The unit basically stands on the spot and idles.
It does not do anything.

A few things of note.
- Removed all the functions except the actual movement order
- Transplanted the trigger into a new blank map

Neither of which has solved the problem.
 
Level 24
Joined
Oct 12, 2008
Messages
1,783
Do you actually want to move unit to CentreOfMap? Because so, Monstermove[3] would be senseless.

Yes, It was to make sure the issue wasn't related to Monstermove [3] being an invalid point.

You can check if unit gets a new move order with a new debug trigger, and you can check if the location you want it to move has the correct coordinates.

Tried that, move orders are being issued only once, as per intended.
The unit however does not do any real movement.
 
Level 24
Joined
Oct 12, 2008
Messages
1,783
Seems like order of attack was not finished. So it works for me order unit to move after a Wait 0 seconds.

I tried that, it still didn't work.
Im starting to think this may be a case of wc3 being incompatible with certain pcs.

Edit:
This might be helpful, too: Event Response Myths

If I read that thread correctly, there shouldn't be problems with attacked/attacking unit.
 
Level 24
Joined
Oct 12, 2008
Messages
1,783
Then idk what's the problem there with your tool, but your version works just fine for me, too.^^

Exactly.

So far the following has been ruled out.
Unit Type - The same thing happens regardless of unit type.
Editor - Neither JNGP nor the vanilla Editor changes this.
Order/Stacking Conflicts - Orders only issue once, watching the unit's UI card shows that this isn't the case.
 
Status
Not open for further replies.
Top