XeNiM666
I lurk for pizza
- Reaction score
- 138
How can i make a simple knockback spell just like in DotA's Barathrum's Greater Bash??
I want it to be in GUI and in MUI or MPI.
I want it to be in GUI and in MUI or MPI.
function foo takes nothing returns nothing
local unit u = GetTriggerUnit() // declare a local variable "u" and initialize it to the triggering unit.
call TriggerSleepAction(10.) // wait for 10 seconds.
call KillUnit(u) // kill the unit that "u" points to (the triggering unit)
endfunction
look for skid tutorials at http://world-editor-tutorials.thehelper.net/. Im sure youll get an idea
Ohhh....
So if Global Variables are used, it won't be MUI, but if Local Variables are used, it will be MUI, Right???
function Trig_Cleanse_Jass_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A00T' ) ) then
return false
endif
if ( not ( GetUnitTypeId(GetSpellAbilityUnit()) == 'Hpal' ) ) then
return false
endif
return true
endfunction
function Trig_Cleanse_Jass_Actions takes nothing returns nothing
call PauseUnitBJ( true, GetSpellTargetUnit() )
call TriggerSleepAction( ( 7.00 - ( 0.50 * I2R(GetUnitAbilityLevelSwapped('A00T', GetSpellAbilityUnit())) ) ) )
call AddSpecialEffectLocBJ( GetUnitLoc(GetSpellTargetUnit()), "Abilities\\Spells\\Human\\DivineShield\\DivineShieldTarget.mdl" )
call TriggerSleepAction( 1.00 )
call RemoveUnit( GetSpellTargetUnit() )
call CreateNUnitsAtLoc( 1, 'o000', GetOwningPlayer(GetSpellAbilityUnit()), GetUnitLoc(GetSpellTargetUnit()), bj_UNIT_FACING )
call UnitApplyTimedLifeBJ( 40.00, 'BTLF', GetLastCreatedUnit() )
call DestroyEffectBJ( GetLastCreatedEffectBJ() )
endfunction
//===========================================================================
function InitTrig_Cleanse_Jass takes nothing returns nothing
set gg_trg_Cleanse_Jass = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Cleanse_Jass, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Cleanse_Jass, Condition( function Trig_Cleanse_Jass_Conditions ) )
call TriggerAddAction( gg_trg_Cleanse_Jass, function Trig_Cleanse_Jass_Actions )
endfunction
local unit u = GetSpellTargetUnit ()
//Stuff involved the variable u
set u = null //To avoid handle leak
local unit cleansed = GetSpellTargetUnit()
call PauseUnitBJ( true, udg_cleansed )
local unit u = GetSpellTargetUnit ()
call KillUnit (u)