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

Whats wrong?

Status
Not open for further replies.
Level 4
Joined
Nov 17, 2007
Messages
57
Hi :) Im making a spell like frostbolt which damages & slows the targets movement speed and attack speed. First i based it on Frostbolt, but couldnt find out how to apply a buff/debuff when someone is hit by it. Then i made this trigger and based it on slow:


Unit - A unit Starts the effect of an ability

(Ability being cast) Equal to Frostbolt

Unit - Set life of (Attacked unit) to ((Life of (Attacked unit)) - 100.00)


When i do this, it damages the caster and not the target, even though the target gets the slow debuff, i really cant figure out whats wrong, please help :)
 
Level 10
Joined
Aug 15, 2008
Messages
448
(Attacked unit) and (Attacking unit) do not apply for an Ability event. Also, it should be better to use a damaging action; here's the trigger:
  • Events
    • Unit - A unit Starts the effect of an ability
  • Conditions
    • (Ability being cast) Equal to Frostbolt
  • Actions
    • Unit - Cause (Casting unit) to damage (target unit of ability being cast) dealing (number) damage of attack type (attack type) and damage type (damage type)
The trigger is: Unit - Damage Target.
I also think that using "triggering unit" instead of "casting unit" will make it faster.
Also remember that, if your spell is a projectile-based one, this trigger will make the caster damaging the target before the projectile could hit it.
 
Status
Not open for further replies.
Top