|
一个技能的触发,在A地图中能用,复制到B图,该改的变量都改了。
但是一旦保存地图就冒了这个编译错误出来。以下是原文
//***************************************************************************
//*
//* Global Variables
//*
//***************************************************************************
globals
// User-defined
real array udg_dist
// Generated
rect gg_rct_Eggzone1 = null
rect gg_rct_Eggzone2 = null
trigger gg_trg_create = null
trigger gg_trg_stop = null
unit gg_unit_n602_0174 = null
trigger gg_trg_SightThrasher = null
trigger gg_trg_Charge = null
trigger gg_trg_execute = null
trigger gg_trg_punish = null
trigger gg_trg_Sound = null
trigger gg_trg_STEP2 = null
sound gg_snd_nuclear = null
sound gg_snd_CreepAggroWhat1 = null
endglobals
function InitGlobals takes nothing returns nothing
local integer i = 0
set i = 0
loop
exitwhen (i > 1)
set udg_dist = 0
set i = i + 1
endloop
endfunction
function Trig_SightThrasher_Conditions takes nothing returns boolean
if ( not ( GetSpellAbilityId() == 'A61M' ) ) then
return false
endif
return true
endfunction
function Trig_SightThrasher_Func001C takes nothing returns boolean
return true
endfunction
function Trig_SightThrasher_Actions takes nothing returns nothing
if ( Trig_SightThrasher_Func001C() ) then
set udg_dist = GetUnitFacing(GetSpellAbilityUnit())
set bj_forLoopAIndex = 1
set bj_forLoopAIndexEnd = 12
loop
exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
set udg_dist = ( udg_dist + 30.00 )
call CreateNUnitsAtLoc( 1, 'h606', GetOwningPlayer(GetSpellAbilityUnit()), GetUnitLoc(GetSpellAbilityUnit()), udg_dist )
call IssuePointOrderLocBJ( GetLastCreatedUnit(), "carrionswarm", PolarProjectionBJ(GetUnitLoc(GetLastCreatedUnit()), 256, udg_dist) )
call UnitApplyTimedLifeBJ( 0.50, 'BTLF', GetLastCreatedUnit() )
set bj_forLoopAIndex = bj_forLoopAIndex + 1
endloop
else
call IssueImmediateOrderBJ( GetSpellAbilityUnit(), "stop" )
endif
endfunction
//===========================================================================
function InitTrig_SightThrasher takes nothing returns nothing
set gg_trg_SightThrasher = CreateTrigger( )
call TriggerRegisterAnyUnitEventBJ( gg_trg_SightThrasher, EVENT_PLAYER_UNIT_SPELL_EFFECT )
call TriggerRegisterTimerEventPeriodic( gg_trg_SightThrasher, 0.05 )
call TriggerAddCondition( gg_trg_SightThrasher, Condition( function Trig_SightThrasher_Conditions ) )
call TriggerAddAction( gg_trg_SightThrasher, function Trig_SightThrasher_Actions )
endfunction
红色为出错部分,dist为变量名。
企盼高手解决。 |
|