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

[Trigger] Non-Autocast abilities ?

Status
Not open for further replies.
Level 17
Joined
Jul 1, 2010
Messages
721
I want to make a haste ability that will give a unit increased movement speed but I don't want it to be auto-cast-able...I want it to be manual cast...
What abilities can I use ? I used bloodlust but that's autocast...Or how could I do it by triggers ?
 
Level 26
Joined
Mar 19, 2008
Messages
3,140
You can either use Acid Bomb ability (change the targets allowed, so it's castable on allied; null damage; null Aoe; null armor reduction) or use trigger editor for dummy caster ability.
Since Acid bomb's fields refer to reductions rather than bonuses, to set speed bonus properly, Shift click on that field and enter negative value, like: -0.15 (make sure in File -> Preferences you allowed negative values in your editor).

  • init
    • Events
      • Unit - A unit Starts effect of ability
    • Conditions
      • (Ability being cast) Equal to <your ability>
    • Actions
      • Set p = (Position of (Triggering unit))
      • Unit - Create 1 dummy for (Triggering player) at p facing Default building facing degrees
      • Unit - Add 0.7 Generic expiration timer to (Last created unit)
      • Unit - Add Blood Lust to (Last created unit)
      • Unit - Order (Last created unit) to Orc - Shaman: Blood Lust (Target unit of ability being cast)
      • Custom script: call RemoveLocation(udg_p)
Where 'p' is location variable. Remember that 'dummy' unit is basically a temporary caster for custom effect purpose. It's stats should be nulled. Remember to remove mana/tech requirements from abilities used by dummies.
And yes, you can use any ability that can manipulate target's movement speed, not only Blood Lust.
 
Level 17
Joined
Jul 1, 2010
Messages
721
You can either use Acid Bomb ability (change the targets allowed, so it's castable on allied; null damage; null Aoe; null armor reduction) or use trigger editor for dummy caster ability.
Since Acid bomb's fields refer to reductions rather than bonuses, to set speed bonus properly, Shift click on that field and enter negative value, like: -0.15 (make sure in File -> Preferences you allowed negative values in your editor).

  • init
    • Events
      • Unit - A unit Starts effect of ability
    • Conditions
      • (Ability being cast) Equal to <your ability>
    • Actions
      • Set p = (Position of (Triggering unit))
      • Unit - Create 1 dummy for (Triggering player) at p facing Default building facing degrees
      • Unit - Add 0.7 Generic expiration timer to (Last created unit)
      • Unit - Add Blood Lust to (Last created unit)
      • Unit - Order (Last created unit) to Orc - Shaman: Blood Lust (Target unit of ability being cast)
      • Custom script: call RemoveLocation(udg_p)
Where 'p' is location variable. Remember that 'dummy' unit is basically a temporary caster for custom effect purpose. It's stats should be nulled. Remember to remove mana/tech requirements from abilities used by dummies.
And yes, you can use any ability that can manipulate target's movement speed, not only Blood Lust.
Thanx alot...I already knew how to do it this way but I was hoping there would be a way to be casted by the computer too. Bloodlust will automatically be casted by AI on allied units when attacked/attacking but Acid Bomb will be casted only on enemy units that attack not on allied ones :(
 
Level 8
Joined
Dec 9, 2009
Messages
397
Giving the NPC's the normal auto castable version would be fine wouldn't it?

You just use the triggered version for the players.
 
Status
Not open for further replies.
Top