• 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.

LoL Spell Bug

Status
Not open for further replies.
Level 8
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,243
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