- Joined
- Feb 7, 2006
- Messages
- 4
JASS:
//*************************************************************
//* Constant Functions (Only edit things under this section.) *
//*************************************************************
constant function FW_Raw_Code takes nothing returns integer
return 'A003'
endfunction
//**************
//* Conditions *
//**************
function FW_Spell_Check takes nothing returns boolean
return GetSpellAbilityId() == FW_Raw_Code()
endfunction
//*************
//* Functions *
//*************
function FW_Dash takes nothing returns nothing
//Local Varibles and Handles
local timer dashtimer = GetExpiredTimer()
local unit caster = GetHandleUnit(dashtimer, "caster")
local location casterpos = GetUnitLoc(caster)
local real xtarget = GetHandleReal(dashtimer, "xtarget")
local real ytarget = GetHandleReal(dashtimer, "ytarget")
local location targetpoint = Location(xtarget, ytarget)
local real angle = AngleBetweenPoints(casterpos,targetpoint)
//Functions
if DistanceBetweenPoints(casterpos,targetpoint) != 0 then
call SetUnitPositionLoc(caster, PolarProjectionBJ(casterpos, 50.00, angle))
else
call PauseUnit(caster, false)
call ResetUnitAnimation(caster)
endif
//Null Variables
set caster = null
call RemoveLocation(casterpos)
call RemoveLocation(targetpoint)
set casterpos = null
set targetpoint = null
endfunction
function FW_Spell takes nothing returns nothing
//Local Variables
local unit caster = GetTriggerUnit()
local timer dashtimer = CreateTimer()
local location targetpoint = GetSpellTargetLoc()
local real xtarget = GetLocationX(targetpoint)
local real ytarget = GetLocationY(targetpoint)
//Handles
call SetHandleHandle(dashtimer, "caster", caster)
call SetHandleReal(dashtimer, "xtarget", xtarget)
call SetHandleHandle(dashtimer, "ytarget", ytarget)
//Functions
call PauseUnit(caster, true)
call SetUnitAnimation(caster, "attack")
call TimerStart(dashtimer, 0.035, true, function FW_Dash)
//Null Variables
call DestroyTimer(dashtimer)
set dashtimer = null
call FlushLocalHandles(dashtimer)
set caster = null
call RemoveLocation(targetpoint)
endfunction
//===========================================================================
function InitTrig_Flame_Walk takes nothing returns nothing
local integer i
set i = 0
set gg_trg_Flame_Walk = CreateTrigger( )
loop
exitwhen i>12
call TriggerRegisterPlayerUnitEventSimple( gg_trg_Flame_Walk, Player(i), EVENT_PLAYER_UNIT_SPELL_EFFECT)
set i = i + 1
endloop
call TriggerAddCondition( gg_trg_Flame_Walk, Condition(function FW_Spell_Check))
call TriggerAddAction( gg_trg_Flame_Walk, function FW_Spell )
endfunction
I am using the HandleVars system and it's imported correctly. But when I try to save the map, it gives me these errors (two pictures):
Does anyone have any clue what's happening? And will this script work? Please help me correct my mistakes, I'm quite new to JASS.
Thanks in advanced.
~Spiky