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

[Spell] new order not stopping old order

Status
Not open for further replies.
Level 21
Joined
Mar 29, 2020
Messages
1,237
hello there,

I am trying to make one of my spells not cast-able on ethereal or invisible units. for some reason even though the rest of the trigger worked, the new order "stop" didn't stop the unit from gong to cast the spell. what am I doing wrong?

  • GG filter
    • Events
      • Unit - A unit Is issued an order targeting an object
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Team Killer
      • (Issued order) Equal to (Order(channel))
    • Actions
      • Set Temp_PlayerGroup = (All enemies of (Triggering player))
      • Player Group - Pick every player in Temp_PlayerGroup and do (Actions)
        • Loop - Actions
          • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            • If - Conditions
              • Or - Any (Conditions) are true
                • Conditions
                  • ((Target unit of issued order) is Ethereal) Equal to True
                  • ((Target unit of issued order) is invisible to (Picked player)) Equal to True
            • Then - Actions
              • Unit - Order (Ordered unit) to Stop
              • Set TempPlayerGroup2 = (Player group((Triggering player)))
              • Game - Display to TempPlayerGroup2 for 10.00 seconds the text: |cffffff00Congratul...
              • Sound - Play Error <gen>
            • Else - Actions
      • Custom script: call DestroyForce(udg_Temp_PlayerGroup)
      • Custom script: call DestroyForce(udg_TempPlayerGroup2)
 
Level 20
Joined
Aug 13, 2013
Messages
1,696
You're using an event that is not only related to detect casts, but also the commands.
Switch to "Starts the Effect Of Ability" event and use "Ability Being Cast" condition instead.
Then use "Triggering Unit" & "Target Unit Of Ability" to refer these units and store them
into variables. You must also pause the unit before ordering it to stop then unpause it after.

EDIT:

If order detection is intended, the underlined part in my statement above should be enough for your case.
 
Level 13
Joined
May 10, 2009
Messages
868
I don't exactly know the reason why that happens; my guess is that some orders have some sort of higher priority over others OR that the event fires before the "channel" order is actually given to the triggering unit, overriding further orders (such as "stop").

Try pausing the unit, order it to stop and unpause them OR use a 0. timer and order the unit to stop in another trigger.
 
Level 20
Joined
Aug 13, 2013
Messages
1,696
I don't exactly know the reason why that happens; my guess is that some orders have some sort of higher priority over others OR that the event fires before the "channel" order is actually given to the triggering unit, overriding further orders (such as "stop").
Yes, we may never know about orders prioritization as order
type events were already fired before the game issues the orders.
I guess certain orders like "stop" are meant to be ignored
(game don't like them to be issued) in this kind of events
to prevent bugs or something. Same thing with "hold position".

And pausing the unit does the trick by bypassing this kind of filter
(it executes another order) and the following stop order solves
the stuck bug a unit may have due to pausing/unpausing instantly.
 
Last edited:
Status
Not open for further replies.
Top