D.V.D
Make a wish
- Reaction score
- 73
Well, I wanted to make a slide in my trigger with timers but I get these wierd Syntax Errors hilighting every line of my code. Here's the code:
Any help?
JASS:
function Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 039;A004039; ) ) then
return false
endif
return true
endfunction
function StopLaser takes nothing returns boolean
if ( not ( udg_Loop == 200 ) ) then
return false
endif
return true
endfunction
function KillLaser takes nothing returns nothing
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = udg_Array
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
call KillUnit( udg_Laser[GetForLoopIndexA()] )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
endfunction
function Laser takes nothing returns nothing
local unit Caster = GetTriggerUnit()
local unit Missile = GetLastCreatedUnit()
local unit Explode
local location p2 = GetUnitLoc(Missile)
local location p3 = PolarProjectionBJ(p2, 12.00, GetUnitFacing(Caster))
local timer t = GetExpiredTimer()
call SetUnitPositionLoc( Missile, p3 )
call CreateNUnitsAtLocFacingLocBJ( 1, 039;h006039;, GetOwningPlayer(Caster), p2, p2 )
set udg_Laser[udg_Array] = GetLastCreatedUnit()
call SetUnitTimeScalePercent( udg_Laser[udg_Array], 0.00 )
set udg_Array = ( udg_Array + 1 )
set udg_Loop = udg_Loop + 1
call TimerStart(t, 0.01, true, function Laser)
if ( StopLaser() ) then
set p2 = GetUnitLoc(Missile)
call CreateNUnitsAtLocFacingLocBJ( 1, 039;h004039;, GetOwningPlayer(Caster), p2, p2 )
set Explode = GetLastCreatedUnit()
call KillUnit( Missile )
call UnitApplyTimedLifeBJ( 1.00, 039;BTLF039;, Explode )
call DestroyTimer(t)
call KillLaser()
else
endif
endfunction
function Actions takes nothing returns nothing
local unit Caster = GetTriggerUnit()
local unit Missile
local location p0 = GetUnitLoc(Caster)
local location p1 = PolarProjectionBJ(p0, 100.00, GetUnitFacing(Caster))
local location p2
local integer i = 1
local integer e = 200
local timer t = CreateTimer()
call AddSpecialEffectTargetUnitBJ( "left hand", Caster, "Bibang.mdx" )
call TriggerSleepAction( 0.50 )
call DestroyEffectBJ( GetLastCreatedEffectBJ() )
call CreateNUnitsAtLocFacingLocBJ( 1, 039;h007039;, GetOwningPlayer(Caster), p1, p0 )
set Missile = GetLastCreatedUnit()
set p2 = GetUnitLoc(Missile)
set udg_Array = 1
set udg_Loop = 1
call TimerStart(t, 0.01, true, function Laser)
endfunction
//===========================================================================
function InitTrig_Kamehameha_Copy takes nothing returns nothing
local trigger t = CreateTrigger()
call TriggerRegisterAnyUnitEventBJ( t, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerAddCondition( t, Condition( function Conditions ) )
call TriggerAddAction( t, function Actions )
endfunction
Any help?