• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[Trigger] My spell don't work with storm bolt

Status
Not open for further replies.
Level 12
Joined
Mar 23, 2008
Messages
942
I did that spell:

  • Kawarimi Cast 2test
    • Events
      • Unit - A unit Learns a skill
    • Conditions
      • (Learned Hero Skill) Equal to Kawarimi no Jutsu (based in berserker)
      • (Level of Kawarimi no Jutsu (based in berserker) for (Triggering unit)) Equal to 1
    • Actions
      • Trigger - Add to Kawarimi working <gen> the event (Unit - (Learning Hero) Takes damage)
      • Trigger - Turn on Kawarimi working <gen>
  • Kawarimi working
    • Events
    • Conditions
      • ((Triggering unit) has buff Kawarimi no Jutsu (based in wind walk)) Equal to True
    • Actions
      • Unit - Set life of (Triggering unit) to ((Life of (Triggering unit)) + (Damage taken))
      • Unit - Remove Kawarimi no Jutsu (based in wind walk) buff from (Triggering unit)
      • Set SpellPoint[0] = (Position of (Triggering unit))
      • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
        • If - Conditions
          • (Unit-type of (Triggering unit)) Equal to Kyubi Jinchuuriki
        • Then - Actions
          • Unit - Create 1 Naruto bunshin for Neutral Passive at SpellPoint[0] facing Default building facing degrees
          • Animation - Play (Last created unit)'s Death animation
          • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
          • Unit - Create 1 Dummy Caster for Neutral Passive at SpellPoint[0] facing Default building facing degrees
          • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
          • Unit - Set level of Kawarimi (based in Invisibility) for (Last created unit) to (Level of Kawarimi no Jutsu (based in berserker) for (Triggering unit))
          • Unit - Order (Last created unit) to Human Sorceress - Invisibility (Triggering unit)
        • Else - Actions
          • Unit - Create 1 Log for Neutral Passive at SpellPoint[0] facing Default building facing degrees
          • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
          • Special Effect - Create a special effect at SpellPoint[0] using Objects\Spawnmodels\Other\ToonBoom\ToonBoom.mdl
          • Special Effect - Destroy (Last created special effect)
          • Sound - Play poof_edited <gen> at 100.00% volume, located at SpellPoint[0] with Z offset 0.00
          • Unit - Create 1 Dummy Caster for Neutral Passive at SpellPoint[0] facing Default building facing degrees
          • Unit - Add a 2.00 second Generic expiration timer to (Last created unit)
          • Unit - Set level of Kawarimi (based in Invisibility) for (Last created unit) to (Level of Kawarimi no Jutsu (based in berserker) for (Triggering unit))
          • Unit - Order (Last created unit) to Human Sorceress - Invisibility (Triggering unit)
      • Custom script: call RemoveLocation(udg_SpellPoint[0])
But when someone cast storm bolt on my hero, the effects are displayed, my unit become invis, but the damage isn't recovered with:

  • Unit - Set life of (Triggering unit) to ((Life of (Triggering unit)) + (Damage taken))
:(
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,258
Because the event triggers before the damage is delt. Thus you reheal to max HP and then take the damage. To avoid this you have to simply delay it for one cycle (via a timer set to expire in 0 seconds) and then reheal the ammount as then the damage would have been taken so you would be rehealing after the damage.

This is a commonproblem due to like I said, the events fire before the actual thing that triggers them does.
 
Level 12
Joined
Mar 23, 2008
Messages
942
Because the event triggers before the damage is delt. Thus you reheal to max HP and then take the damage. To avoid this you have to simply delay it for one cycle (via a timer set to expire in 0 seconds) and then reheal the ammount as then the damage would have been taken so you would be rehealing after the damage.

This is a commonproblem due to like I said, the events fire before the actual thing that triggers them does.
... o.o"

I don't know how to do that...
I mean, use the timer and still have a MUI spell...

Edit: I found something strange, I put that:

  • If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    • If - Conditions
      • (Damage taken) Greater than or equal to (Life of (Triggering unit))
    • Then - Actions
      • Game - Display to (All players) the text: THEN
      • Game - Display to (All players) the text: (String((Damage taken)))
      • Game - Display to (All players) the text: (String((Life of (Triggering unit))))
      • Unit - Set life of (Triggering unit) to ((Life of (Triggering unit)) + (Damage taken))
      • Wait 0.00 seconds
      • Unit - Remove Negative buffs from (Triggering unit)
    • Else - Actions
      • Game - Display to (All players) the text: ELSE
      • Game - Display to (All players) the text: (String((Damage taken)))
      • Game - Display to (All players) the text: (String((Life of (Triggering unit))))
      • Wait 0.00 seconds
      • Custom script: call SetUnitState(GetTriggerUnit(), UNIT_STATE_LIFE, life)
      • Unit - Remove Negative buffs from (Triggering unit)
But with storm bolt it ALWAYS go to the ELSE... (My unit die to the storm bolt)
Wtf?

Edit2: IMAGE INCLUDED! First one with storm bolt, second with normal attack!
 

Attachments

  • error13.JPG
    error13.JPG
    184.1 KB · Views: 119
  • error14.JPG
    error14.JPG
    200.9 KB · Views: 113
Last edited:
Status
Not open for further replies.
Top