- Joined
- Aug 30, 2009
- Messages
- 114
Hello everyone, I want to know how to create spells like the Glaives of Wisdom from the Silencer (DotA) or the Burning Spear from Huskar (DotA). These spells are auto-casting spells that changes their attack. The Glaives of Wisdom add some pure damage based on your intelligence, and a floating text is shown over the target's head. But I know they don't use "Event - Unit Attacked" or "Event - Unit Damaged" because the first one will cause the floating text to be shown before the damage is dealt by the attack and the Unit Damaged would cause the floating text to be shown whenever the unit take any damage from the caster. I tryed with buffs, something like it:
EXAMPLE ONLY
Event - Unit Attacked
This way, the spell is almost perfect, BUT, there is a problem, If I use an auto-cast spell, when you order your hero to cast the spell, it doesn't work.
And the Silencer spell from DotA don't leave any buff.
Anyone knows how exactly to do it?
----------------------
Useless doubt, I wanna know wich magic resistance I can use to stack. Example: The Spell Damage Reduction don't stack with each other, I need another Magic Resistance spell to stack with it, can someone tell me?
EXAMPLE ONLY
Event - Unit Attacked
JASS:
local unit U = GetAttacker()
local unit T = GetTriggerUnit()
loop
exitwhen UnitHasBuffBJ('BUFF', T) or (IsUnitAliveBJ(T) == false)
call TriggerSleepAction(0.10)
endloop
call UnitDamageTargetBJ(U, T, 90.00, ATTACK_TYPE_NORMAL, DAMAGE_TYPE_UNIVERSAL)
set U = null
set T = null
And the Silencer spell from DotA don't leave any buff.
Anyone knows how exactly to do it?
----------------------
Useless doubt, I wanna know wich magic resistance I can use to stack. Example: The Spell Damage Reduction don't stack with each other, I need another Magic Resistance spell to stack with it, can someone tell me?