- Joined
- Sep 20, 2015
- Messages
- 385
So, in this pages i found out that the function Set Unit X/Y is better and faster than Move unit, so i decided to use them in my map. There is a problem when is insert the custom scritps lines in the GUI trigger, it always say ''Expected end of the line'' error! I tried to convert in Jass and adjust some things but i messed it up even more... here is the trigger in JASS (original, not messed up more of course)
Those two lines with Error at the end are the problem. Thanks for the help
JASS:
function Trig_Leap_Dash_Loop_Func003C takes nothing returns boolean
if ( not ( udg_Real[1] >= 0.00 ) ) then
return false
endif
return true
endfunction
function Trig_Leap_Dash_Loop_Actions takes nothing returns nothing
set udg_Points[1] = GetUnitLoc(udg_LeapCaster)
set udg_Points[2] = PolarProjectionBJ(udg_Points[1], 33.00, udg_Real[3])
if ( Trig_Leap_Dash_Loop_Func003C() ) then
set udg_Real[1] = ( udg_Real[1] - 33.00 )
call SetUnitY(udg_LeapCaster), GetUnitY(udg_LeapCaster) + udg_Real[1] * Sin(bj_DEGTORAD * udg_Real[3]) ERROR!
call SetUnitX(udg_LeapCaster), GetUnitX(udg_LeapCaster) + udg_Real[1] * Cos(bj_DEGTORAD * udg_Real[3]) ERROR!
else
call SetUnitPathing( udg_LeapCaster, true )
call SetUnitFlyHeightBJ( udg_LeapCaster, GetUnitDefaultFlyHeight(udg_Caster), 0.00 )
call CreateNUnitsAtLoc( 1, 'h009', GetOwningPlayer(udg_LeapCaster), udg_Points[2], bj_UNIT_FACING )
call UnitApplyTimedLifeBJ( 0.50, 'BTLF', GetLastCreatedUnit() )
call UnitAddAbilityBJ( 'A01N', GetLastCreatedUnit() )
call SetUnitAbilityLevelSwapped( 'A01N', GetLastCreatedUnit(), 1 )
call IssueImmediateOrderBJ( GetLastCreatedUnit(), "stomp" )
call RemoveLocation(udg_Points[1])
call RemoveLocation(udg_Points[2])
call DisableTrigger( GetTriggeringTrigger() )
endif
endfunction
//===========================================================================
function InitTrig_Leap_Dash_Loop takes nothing returns nothing
set gg_trg_Leap_Dash_Loop = CreateTrigger( )
call TriggerRegisterTimerEventPeriodic( gg_trg_Leap_Dash_Loop_Copia, 0.03 )
call TriggerAddAction( gg_trg_Leap_Dash_Loop, function Trig_Leap_Dash_Loop_Actions )
endfunction
Those two lines with Error at the end are the problem. Thanks for the help
Last edited by a moderator: