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

LoL Spell Bug

Status
Not open for further replies.
Level 7
Joined
Apr 19, 2008
Messages
146
Hello, i'm creating a new DOTA map, with League Of Legend Champions, and I have a problem with Annie's Disintigrate abillity.

Disintigrate - Annie hurls a mana infused fireball, dealing damage and refunding the mana cost if it destroys the target.

Here's my trigger:
  • Events
    • Unit - A unit begins casting an ability
  • Conditions
    • (Abillity being cast) Equal to Disintigrate
  • Actions
    • Wait until (((Target unit of ability being cast) is dead) Equal to True). checking every 0.10 seconds.
    • Hero - Create Disintigrate mana regen* and give it to (Caster unit)
*Disintigrate mana regen is an item that regens some mana points automaticly when you pick it

The problem is that everytime I cast the abillity the item is created, even if the ennemy is not dead.

Can anyone help me, please?
 
Level 37
Joined
Mar 6, 2006
Messages
9,240
You could use this, but it would be better to use unit dies -event. Waits aren't accurate, it this loop does unnecessary work.

  • Untitled Trigger 017
    • Events
      • Unit - A unit Starts the effect of an ability
    • Conditions
      • (Ability being cast) Equal to Holy Light
    • Actions
      • Custom script: local unit u = GetSpellTargetUnit()
      • Custom script: loop
      • Custom script: exitwhen IsUnitType( u , UNIT_TYPE_DEAD )
      • Wait 0.10 seconds
      • Custom script: endloop
      • Game - Display to Player Group - Player 1 (Red) the text: Dead
      • Custom script: set u = null
Your trigger has the wrong event, and GUI target unit of ability being cast won't work after wait.
 
Status
Not open for further replies.
Top