1. Updated Resource Submission Rules: All model & skin resource submissions must now include an in-game screenshot. This is to help speed up the moderation process and to show how the model and/or texture looks like from the in-game camera.
    Dismiss Notice
  2. DID YOU KNOW - That you can unlock new rank icons by posting on the forums or winning contests? Click here to customize your rank or read our User Rank Policy to see a list of ranks that you can unlock. Have you won a contest and still haven't received your rank award? Then please contact the administration.
    Dismiss Notice
  3. Lead your forces to battle in the 15th Techtree Contest. The call is yours, commander!
    Dismiss Notice
  4. The reforging of the races is complete. Come see the 14th Techtree Contest Results.
    Dismiss Notice
  5. It's time to choose your horse in the race - the 32nd Modeling Contest Poll is up!
    Dismiss Notice
  6. Check out the Staff job openings thread.
    Dismiss Notice
Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Trigger Damage before animation occurs

Discussion in 'World Editor Help Zone' started by Impereal Gardian, Dec 8, 2014.

  1. Impereal Gardian

    Impereal Gardian

    Joined:
    Dec 11, 2010
    Messages:
    100
    Resources:
    0
    Resources:
    0
    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 :)
     
  2. Wietlol

    Wietlol

    Joined:
    Aug 1, 2013
    Messages:
    4,638
    Resources:
    3
    Spells:
    3
    Resources:
    3
    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.
     
  3. Impereal Gardian

    Impereal Gardian

    Joined:
    Dec 11, 2010
    Messages:
    100
    Resources:
    0
    Resources:
    0
    Last edited: Dec 9, 2014
  4. Arhowk

    Arhowk

    Joined:
    Aug 8, 2007
    Messages:
    2,752
    Resources:
    0
    Resources:
    0