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

Channeling targetting ability that applies buff?

Level 5
Joined
Nov 3, 2018
Messages
80
Hello is ther a channeling ability that applies a buff into the target? aerial shackles is excellent for this but i'm not looking to disable the unit's movement
life drain does not apply any buff sadly neither

what are my alternatives?

what i am trying to achieve is a spell (unit) that mind controls the objetive while the unit is still channeling (easiest way being tracking a buff)
 

Uncle

Warcraft Moderator
Level 64
Joined
Aug 10, 2018
Messages
6,563
Nothing comes to mind, but Dummy units solve most of these problems:
  • Events
    • Unit - A unit Starts the effect of an ability
  • Conditions
    • (Ability being cast) Equal to ChanneledAbility
  • Actions
    • Set Variable TempPoint = (Position of (Target unit of ability being cast))
    • Unit - Create 1 Dummy for (Triggering player) at TempPoint
    • Custom script: call RemoveLocation( udg_TempPoint )
    • Unit - Add a 0.20 second Expiration timer to (Last created unit)
    • Unit - Add ChanneledAbilityBuff to (Last created unit)
    • Unit - Set level of ChanneledAbilityBuff for (Last created unit) to (Level of (Ability being cast))
    • Unit - Order (Last created unit) to Human - Sorceress - Slow (Target unit of ability being cast)
ChanneledAbilityBuff is based on the Slow ability but has it's speed reduction fields set to 0%.


Note that the easiest way to track it is probably not with a buff, but with something like Unit Indexing:
  • Events
    • Unit - A unit Starts the effect of an ability
  • Conditions
    • (Ability being cast) Equal to ChanneledAbility
  • Actions
    • -------- Link the caster to the target --------
    • Set Variable Channel_CV = (Custom value of (Triggering unit))
    • Set Variable Channel_Link[Channel_CV] = (Target unit of ability being cast)
    • -------- Link the target to the caster --------
    • Set Variable Channel_CV = (Custom value of (Target unit of ability being cast))
    • Set Variable Channel_Link[Channel_CV] = (Triggering unit)
This links the two units together, so if you ever have a reference to the caster (triggering unit) you will also have a reference to the target unit (target unit of ability being cast) and vice-versa. This means that no matter what the situation, you can always get these two units as long as you have a reference to one of them.

As a result we can now reference the (Target unit of ability being cast) when the channeling stops:
  • Events
    • Unit - A unit Stops casting an ability
  • Conditions
    • (Ability being cast) Equal to ChanneledAbility
  • Actions
    • -------- You can get the (Target unit of ability being cast) here by referencing Channel_Link[Channel_CV] --------
    • Set Variable Channel_CV = (Custom value of (Triggering unit))
    • Unit - Kill Channel_Link[Channel_CV]
I kill the target unit just as an example, this is where you would reset ownership or whatever it is you intend to do.

Note that these mind control abilities that change ownership often have bugs when multiple "mind controls" occur on the same unit at the same time. What happens is that the unit's original owner gets lost. This may not be an issue in your map, since it all depends on how your triggers are intended to work. Luckily, Unit Indexing makes this very easy to solve, which I can show you if need be.
 
Last edited:
Top