1. Fill your cup and take your pick among the maps best suited for this year's Hive Cup. The 6th Melee Mapping Contest Poll is up!
    Dismiss Notice
  2. Shoot to thrill, play to kill. Sate your hunger with the 33rd Modeling Contest!
    Dismiss Notice
  3. Do you hear boss music? It's the 17th Mini Mapping Contest!
    Dismiss Notice
  4. 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] Spell won't work as intended

Discussion in 'Triggers & Scripts' started by biHmapmaker, Jul 26, 2012.

  1. biHmapmaker

    biHmapmaker

    Joined:
    Oct 10, 2009
    Messages:
    99
    Resources:
    0
    Resources:
    0
    Triggers
    • Events
      • Unit - A unit Begins casting an ability
    • Conditions
      • (Ability being cast) Equal to Shadow Souls
    • Actions
      • Set SS_caster_target[0] = (Casting unit)
      • Set SS_caster_target[1] = (Targeted unit)
      • Set SS_damage_leech[0] = (120 + (Intelligence of SS_caster_target[0] (Include bonuses)))
      • Set SS_damage_leech[1] = (20 + (Intelligence of SS_caster_target[0] (Exclude bonuses)))
      • Set SS_points[0] = (Position of SS_caster_target[0])
      • Set SS_points[1] = (Position of SS_caster_target[1])
      • Sound - Play HeroLichYesAttack1 <gen> at 100.00% volume, attached to SS_caster_target[0]
      • Special Effect - Create a special effect attached to the chest of SS_caster_target[0] using Abilities\Spells\Items\TomeOfRetraining\TomeOfRetrainingCaster.mdl
      • Special Effect - Destroy (Last created special effect)
      • Special Effect - Create a special effect at SS_points[1] using Abilities\Spells\Undead\AnimateDead\AnimateDeadTarget.mdl
      • Special Effect - Destroy (Last created special effect)
      • Unit - Cause SS_caster_target[0] to damage SS_caster_target[1], dealing (Real(SS_damage_leech[0])) damage of attack type Spells and damage type Shadow Strike
      • Unit - Set life of SS_caster_target[0] to ((Life of SS_caster_target[0]) + (Real(SS_damage_leech[1])))
      • Special Effect - Create a special effect attached to the overhead of SS_caster_target[0] using Abilities\Spells\Demon\DarkPortal\DarkPortalTarget.mdl
      • Special Effect - Destroy (Last created special effect)
      • Custom script: call RemoveLocation(udg_SS_points[0])
      • Custom script: call RemoveLocation(udg_SS_points[1])


    Spell does heal as intended and every special effect works, but it doesn't deal damage. It is based on "Chain of Lighting" spell and the number of targets is 3. I know that it has something to to with targets variables but can't click what. Thanks in advance.
     
  2. claptomanic

    claptomanic

    Joined:
    Jul 10, 2011
    Messages:
    562
    Resources:
    0
    Resources:
    0
    dont use targeted unit use target of ability being cast^^ then itll work xD
     
  3. biHmapmaker

    biHmapmaker

    Joined:
    Oct 10, 2009
    Messages:
    99
    Resources:
    0
    Resources:
    0
    Tnx :=)