[Solved] Trigger - casting an ability into another

Status
Not open for further replies.
Level 3
Joined
Mar 22, 2021
Messages
10
Hello,

I'm trying to make a trigger that will do that:

  • my hero casting thunderbolt on an ennemy unit
  • create a dummy for owner of attacked unit that will cast spirit link on it (and technically link to ennemies nearby but it's already in the spell with the range)

I'm new to all that trigger things and I tried something like this but it doesn't work, what am I missing?

It's the only way I found to cast spirit link on ennemies as a debuff (with 100% damage reflected to any link) but I'm open to any solution :thumbs_up:

If I replace the dummy (well edited) with spirit walker, it spawns in my team and cast spirit link on my hero.

  • SpiritLink on Ennemies
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Thunderbolt
    • Actions
      • Unit - Create 1 Dummy for (Owner of (Attacked unit)) at (Target point of ability being cast) facing Default building facing degrees
      • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
      • Unit - Add Spirit Link to (Last created unit)
      • Unit - Order (Last created unit) to Orc Spirit Walker - Spirit Link (Attacked unit)
 
Last edited:

Uncle

Warcraft Moderator
Level 73
Joined
Aug 10, 2018
Messages
7,866
Your Events and Event Responses need to match. You're creating the Dummy for (Owner of (Attacked unit)) but the Event has nothing to do with a Unit being attacked, therefore the Event Response won't work.

Here are the Event Responses that you can use with the Event -> Unit - A unit Begins casting an ability
  • Triggering unit = The unit that cast the ability.
  • Casting unit = The unit that cast the ability (same as triggering unit).
  • Target unit of ability being cast = The unit that you targeted with the ability (used by Storm Bolt, Bloodlust, etc).
  • Target point of ability being cast = The point that you targeted with the ability (used by Shockwave, Serpent Ward, etc).
So the important ones here are obviously Target unit of ability being cast and Triggering unit. I recommend using Triggering Unit over Casting Unit as it has less limitations despite them being the same unit. This holds true for other Events that use Triggering unit.

Here's how it should look:
  • Example
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Thunderbolt
    • Actions
      • Set VariableSet TempPoint = (Position of (Target unit of ability being cast))
      • Unit - Create 1 Dummy for (Owner of (Target unit of ability being cast)) at TempPoint facing Default building facing degrees
      • Custom script: call RemoveLocation (udg_TempPoint)
      • Unit - Add a 0.50 second Generic expiration timer to (Last created unit)
      • Unit - Add Spirit Link to (Last created unit)
      • Unit - Order (Last created unit) to Orc Spirit Walker - Spirit Link (Target unit of ability being cast)

Some other important things to note.

You want to use the Event:
  • Unit - A unit Starts the effect of an ability
This is because Begins casting happens before mana costs have been paid and before the effects of the ability have started. Meaning the player can cancel the ability and the Event will still happen. The player could exploit this and cancel their cast early in order to run the trigger over and over again for free.

Additionally, you want to make sure your Dummy unit is setup properly.
It should be based on the Locust unit with these additional settings:
Attack Type = None
Movement Type = None
Speed Base = 0
Cast Point / Cast Backswing = 0.00
Death Type = Can't Raise, Does Not Decay
 
Last edited:
Level 3
Joined
Mar 22, 2021
Messages
10
Your Events and Event Responses need to match. You're creating the Dummy for (Owner of (Attacked unit)) but the Event has nothing to do with a Unit being attacked, therefore the Event Response won't work.

Here are the Event Responses that you can use with the Event -> Unit - A unit Begins casting an ability
  • Triggering unit = The unit that cast the ability.
  • Casting unit = The unit that cast the ability (same as triggering unit).
  • Target unit of ability being cast = The unit that you targeted with the ability (used by Storm Bolt, Bloodlust, etc).
  • Target point of ability being cast = The point that you targeted with the ability (used by Shockwave, Serpent Ward, etc).
So the important ones here are obviously Target unit of ability being cast and Triggering unit. I recommend using Triggering Unit over Casting Unit as it has less limitations despite them being the same unit. This holds true for other Events that use Triggering unit.

Here's how it should look:
  • Example
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Thunderbolt
    • Actions
      • Set VariableSet TempPoint = (Position of (Target unit of ability being cast))
      • Unit - Create 1 Dummy for (Owner of (Target unit of ability being cast)) at TempPoint facing Default building facing degrees
      • Custom script: call RemoveLocation (udg_TempPoint)
      • Unit - Add a 0.50 second Generic expiration timer to (Last created unit)
      • Unit - Add Spirit Link to (Last created unit)
      • Unit - Order (Last created unit) to Orc Spirit Walker - Spirit Link (Target unit of ability being cast)

Some other important things to note.

You want to use the Event:
  • Unit - A unit Starts the effect of an ability
This is because Begins casting happens before mana costs have been paid and before the effects of the ability have started. Meaning the player can cancel the ability and the Event will still happen. The player could exploit this and cancel their cast early in order to run the trigger over and over again for free.

Additionally, you want to make sure your Dummy unit is setup properly.
It should be based on the Locust unit with these additional settings:
Attack Type = None
Movement Type = None
Speed Base = 0
Cast Point / Cast Backswing = 0.00
Death Type = Can't Raise, Does Not Decay
Thank you for all the information about that those triggers, I've tried yours it and it works perfectly as I wanted. Thank you! :thumbs_up:
 
Status
Not open for further replies.
Top