• 🏆 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 Damage before animation occurs

Status
Not open for further replies.
Level 5
Joined
Dec 11, 2010
Messages
101
I based a spell off of Shadow Strike, where it deals 150 (+0 to 350) damage, and 50 damage over time for 5 seconds.

Problem is, the triggered damage occurs before the missile even hits the target.

  • FireballA
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Fireball
    • Actions
      • Set Targeted = (Target unit of ability being cast)
and

  • FireballB
    • Events
      • Unit - A unit Finishes casting an ability
    • Conditions
      • (Ability being cast) Equal to Fireball
    • Actions
      • Unit - Cause (Casting unit) to damage Targeted, dealing (Random real number between 0.00 and 350.00) damage of attack type Spells and damage type Normal
I'm not great with a good potion of triggers, but i'm working on it.
Thanks :)
 
Level 24
Joined
Aug 1, 2013
Messages
4,657
That is true.
First of all. Don't use "Finishes casting an ability". If you cancel the finishing animation, the trigger will not run but the missile and effects will be there.

For these things, you need a DDS (Damage Detection System).
You can search for some good ones.
A DDS is simply calling a function whenever a unit takes damage (0 damage included). Then you check if the unit has the buff made by the ability (which should be 0.01) and so you can know if the unit is damaged by the fireball.
 
Status
Not open for further replies.
Top