Tholdalf
New Member
- Reaction score
- 2
Ok so i have read some more jas tuts and now i have run into a problem.
how does i set the last created special effect to a local? and what local shall i use?
i is the local i´m trying to set to the effect.
how does i set the last created special effect to a local? and what local shall i use?
i is the local i´m trying to set to the effect.
Code:
function Trig_Greater_Bash_Conditions takes nothing returns boolean
return ( GetSpellAbilityId() == 'A000' )
endfunction
function Trig_Greater_Bash_Actions takes nothing returns nothing
local unit a //Casting Unit//
local unit b //Targeted Unit of Ability//
local location c //Location of unit a//
local location d //Location of unit b//
local integer e //Amount moved for etch loop//
local integer f
local real g //Facing of unit eg which way b will move to//
local real h
local effect i //Special Effect//
set a=GetTriggerUnit()
set b=GetSpellTargetUnit()
set c=GetUnitLoc(a)
set d=GetUnitLoc(b)
set e=0
set g=GetUnitFacing(a)
loop
exitwhen (e>30)
set e=e+1
call SetUnitPositionLoc( b, PolarProjectionBJ(d, ( DistanceBetweenPoints(d, GetUnitLoc(b)) + 20.00 ), AngleBetweenPoints(c, GetUnitLoc(b))) )
call UnitApplyTimedLifeBJ( 1, 'BTLF', GetLastCreatedUnit() )
call TriggerSleepAction(0.01)
call AddSpecialEffectLocBJ( GetUnitLoc((b)), "Objects\\Spawnmodels\\Undead\\ImpaleTargetDust\\ImpaleTargetDust.mdl" )
set i=
endloop
endfunction
//===========================================================================
function InitTrig_Greater_Bash takes nothing returns nothing
set gg_trg_Greater_Bash = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_Greater_Bash, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Greater_Bash, Condition( function Trig_Greater_Bash_Conditions ) )
call TriggerAddAction( gg_trg_Greater_Bash, function Trig_Greater_Bash_Actions )
endfunction