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)
 
(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.
 
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.
Back
Top