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

Cancel Cast on Burrowed Unit

Status
Not open for further replies.
I use this trigger with numerous spells and have had no issues. When I call for it to be used on a burrowed unit the spell is still cast. Thoughts?

  • Dark Mark Try B
    • Events
      • Unit - A unit Is issued an order targeting an object
    • Conditions
      • (Unit-type of (Triggering unit)) Equal to Executioner
      • (Issued order) Equal to (Order(bloodlust))
      • (Unit-type of (Target unit of ability being cast)) Equal to Burrowed Scourge
    • Actions
      • Wait 0.00 seconds
      • Set ErrorPlayer = (Owner of (Triggering unit))
      • Unit - Order (Triggering unit) to Stop
      • Set ErrorMessage = Unable to target burrowed units.
      • Custom script: call ErrorMessage(udg_ErrorMessage,udg_ErrorPlayer)
 
Level 28
Joined
Feb 18, 2014
Messages
3,579
What's the point of the wait 0.00 second anyway?
And what do you mean the spell is still casting which one is it? And since you unable to target burrowed unit that might be the answer to the question, is that right?
 
Level 37
Joined
Jul 22, 2015
Messages
3,485
(Unit-type of (Target unit of ability being cast)) Equal to Burrowed Scourge

you said equal to true

when it should be not equal to true.
He wants it to work for Burrowed Scourge. You are partially right though, the issue is with his condition statement. It should be changed to this:
  • (Unit-type of (Target unit of issued order)) Equal to Burrowed Scourge
I'm pretty sure (Target unit of ability being cast) with this event will return null.
 
Level 28
Joined
Feb 18, 2014
Messages
3,579
He wants it to work for Burrowed Scourge. You are partially right though, the issue is with his condition statement. It should be changed to this:
  • (Unit-type of (Target unit of issued order)) Equal to Burrowed Scourge
I'm pretty sure (Target unit of ability being cast) with this event will return null.

Casting an ability isn't considred an issued order?
 
Level 37
Joined
Jul 22, 2015
Messages
3,485
Casting an ability isn't considred an issued order?

It is, but he uses the "A unit Is issued an order targeting an object" event. There is no ability here, so GetSpellTargetUnit() will return nothing (or null, I still don't get this programming lingo) if you attempt to call it.
  • No text will appear
    • Get Name
      • Events
        • Unit - A unit Is issued an order targeting an object
      • Conditions
      • Actions
        • Set TempUnit = (Target unit of ability being cast)
        • -------- --------
        • Game - Display to (All players) the text: (Name of TempUnit)

  • Text will appear
    • Get Name
      • Events
        • Unit - A unit Is issued an order targeting an object
      • Conditions
      • Actions
        • Set TempUnit = (Target unit of issued order)
        • -------- --------
        • Game - Display to (All players) the text: (Name of TempUnit)
 
Level 37
Joined
Jul 22, 2015
Messages
3,485
Have you tried my suggestion?

the issue is with his condition statement. It should be changed to this:
  • (Unit-type of (Target unit of issued order)) Equal to Burrowed Scourge
I'm pretty sure (Target unit of ability being cast) with this event will return null.

he uses the "A unit Is issued an order targeting an object" event. There is no ability here, so GetSpellTargetUnit() will return nothing (or null, I still don't get this programming lingo) if you attempt to call it.
  • No text will appear
    • Get Name
      • Events
        • Unit - A unit Is issued an order targeting an object
      • Conditions
      • Actions
        • Set TempUnit = (Target unit of ability being cast)
        • -------- --------
        • Game - Display to (All players) the text: (Name of TempUnit)

  • Text will appear
    • Get Name
      • Events
        • Unit - A unit Is issued an order targeting an object
      • Conditions
      • Actions
        • Set TempUnit = (Target unit of issued order)
        • -------- --------
        • Game - Display to (All players) the text: (Name of TempUnit)
 
  • Like
Reactions: Kam
Status
Not open for further replies.
Top