LuckyStrike
New Member
- Reaction score
- 1
Hy, i got a problem with my spell...
The spell : Shadowstep - works the same as blink but only on units
I want to add a slow effect to my spell.
Here's how far i got: (converted from MUI to JASS)
The spell : Shadowstep - works the same as blink but only on units
I want to add a slow effect to my spell.
Here's how far i got:
JASS:
function Trig_Shadowstep_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 039;A008039; ) ) then
return false
endif
return true
endfunction
function Trig_Shadowstep_Func009C takes nothing returns boolean
if ( not ( IsUnitEnemy(udg_Shadow_Units[2], GetOwningPlayer(udg_Shadow_Units[1])) == true ) ) then
return false
endif
return true
endfunction
function Trig_Shadowstep_Actions takes nothing returns nothing
set udg_Shadow_Units[1] = GetTriggerUnit()
set udg_Shadow_Units[2] = GetSpellTargetUnit()
set udg_Shadow_Point = GetUnitLoc(udg_Shadow_Units[2])
call AddSpecialEffectTargetUnitBJ( "feet", udg_Shadow_Units[1], "Abilities\\Spells\\Undead\\CarrionSwarm\\CarrionSwarmDamage.mdl" )
set udg_Shadow_effects[1] = GetLastCreatedEffectBJ()
call TriggerSleepAction( 0.03 )
call AddSpecialEffectTargetUnitBJ( "feet", udg_Shadow_Units[1], "Abilities\\Spells\\Undead\\DeathCoil\\DeathCoilSpecialArt.mdl" )
set udg_Shadow_effects[2] = GetLastCreatedEffectBJ()
if ( Trig_Shadowstep_Func009C() ) then
call SetUnitPositionLoc( udg_Shadow_Units[1], udg_Shadow_Point )
call IssueTargetOrder( udg_Shadow_Units[1], "attack", udg_Shadow_Units[2] )
else
endif
endfunction
//===========================================================================
function InitTrig_Shadowstep takes nothing returns nothing
set gg_trg_Shadowstep = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Shadowstep, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Shadowstep, Condition( function Trig_Shadowstep_Conditions ) )
call TriggerAddAction( gg_trg_Shadowstep, function Trig_Shadowstep_Actions )
endfunction