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

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 29
Joined
Feb 18, 2014
Messages
3,592
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?
 
(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 29
Joined
Feb 18, 2014
Messages
3,592
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?
 
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)
 
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