- Joined
- Dec 29, 2006
- Messages
- 994
The World Editor dislikes this line
in a spell that throws a unit
Full code:
JASScraft gives me no errors, but for the line in question I get this error: Undeclared Function UnitMoveToAsProjectile
I was wondering if there was a file you needed to make it work, like you do for the CS cache.
I don't know anything about the CS cache, but my friend says you need it to make certain spells (like knockback) work properly.
JASS:
call UnitMoveToAsProjectile (v, 0.5, x, y, 0.00)
Full code:
JASS:
function Trig_Throw_Conditions takes nothing returns boolean
return GetSpellAbilityId() == 'A058'
endfunction
function Trig_Throw_Actions takes nothing returns nothing
local unit t
local unit v = GetSpellTargetUnit()
local unit c = GetTriggerUnit()
local real x = GetUnitX(c)
local real y = GetUnitY(c)
call ShowUnitHide(v)
call TriggerSleepAction (5.00)
call CreateNUnitsAtLoc( 1, 'opeo', GetOwningPlayer(c), PolarProjectionBJ(GetUnitLoc(c), ( 100.00 + ( 100.00 * I2R(GetUnitAbilityLevelSwapped('A058', c)) ) ), GetUnitFacing(c)), bj_UNIT_FACING )
set t = GetLastCreatedUnit ()
call SetUnitPositionLoc( v, GetUnitLoc(c) )
call ShowUnitShow(v)
call PauseUnitBJ( true, c )
call SetUnitAnimation( c, "spell" )
call TriggerSleepAction( 1.07 )
call PauseUnitBJ( false, c )
call UnitMoveToAsProjectile (v, 0.5, x, y, 0.00)
call UnitDamageTargetBJ( c, v, ( 100.00 + ( 50.00 * I2R(GetUnitAbilityLevelSwapped('A058', c)) ) ), ATTACK_TYPE_NORMAL, DAMAGE_TYPE_NORMAL )
endfunction
//===========================================================================
function InitTrig_Throw takes nothing returns nothing
set gg_trg_Throw = CreateTrigger( )
call TriggerRegisterUnitEvent( gg_trg_Throw, gg_unit_O005_0998, EVENT_UNIT_SPELL_EFFECT )
call TriggerAddCondition( gg_trg_Throw, Condition( function Trig_Throw_Conditions ) )
call TriggerAddAction( gg_trg_Throw, function Trig_Throw_Actions )
endfunction
JASScraft gives me no errors, but for the line in question I get this error: Undeclared Function UnitMoveToAsProjectile
I was wondering if there was a file you needed to make it work, like you do for the CS cache.
I don't know anything about the CS cache, but my friend says you need it to make certain spells (like knockback) work properly.