• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

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