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

Unit not obeying stop order

Status
Not open for further replies.
This stops the spell from being cast and displays the error message, but does not stop the unit from moving into cast range. Why?

  • Decoy Creation Try
    • Events
      • Unit - A unit Is issued an order targeting an object
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Decoy
      • (Issued order) Equal to (Order(bloodlust))
    • Actions
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • And - All (Conditions) are true
            • Conditions
              • (Unit-type of (Target unit of issued order)) Not equal to Lancer
              • (Unit-type of (Target unit of issued order)) Not equal to Battleship
              • (Unit-type of (Target unit of issued order)) Not equal to Bulwark
              • (Unit-type of (Target unit of issued order)) Not equal to Pulverizer
              • (Unit-type of (Target unit of issued order)) Not equal to Juggernaught
              • (Unit-type of (Target unit of issued order)) Not equal to Giant Sea Turtle
              • (Unit-type of (Target unit of issued order)) Not equal to Incursus
              • (Unit-type of (Target unit of issued order)) Not equal to Ravager
              • (Unit-type of (Target unit of issued order)) Not equal to Derelict
              • (Unit-type of (Target unit of issued order)) Not equal to Transport Ship
              • (Unit-type of (Target unit of issued order)) Not equal to Transport Ship
        • Then - Actions
          • Set ErrorPlayer = (Owner of (Triggering unit))
          • Unit - Order (Triggering unit) to Stop
          • Set ErrorMessage = Must target your racial naval or amphibious units.
          • Custom script: call ErrorMessage(udg_ErrorMessage,udg_ErrorPlayer)
        • Else - Actions
 
Level 33
Joined
Mar 27, 2008
Messages
8,035
Add a Wait of 0.00 second at the start of the Action.
Sometimes Events fired too fast before the Action is done, maybe that's what causing it.

NOTE: Adding a 0.00 second of Wait does not affect its MUI-ness.

Or perhaps this has something to do with stopping a Bloodlust-based ability from targeting a certain units ?

If it's a Bloodlust-based ability, you should perhaps;

  • Bloodlust Stop
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Bloodlust
      • (Unit-type of (Triggering unit)) Equal to Decoy
    • Actions
      • Wait 0.00 seconds
      • Unit - Order (Triggering unit) to Stop
      • -------- FURTHER ACTIONS HERE --------
 
Status
Not open for further replies.
Top