|
楼主 |
发表于 2008-9-2 15:19:25
|
显示全部楼层
大大的BUG 不会修正- function Trig_hqs_Conditions takes nothing returns boolean
- if ( not ( GetSpellAbilityId() == 'A001' ) ) then
- return false
- endif
- return true
- endfunction
- function Trig_hqs_Actions takes nothing returns nothing
- set udg_dw[1] = GetTriggerUnit()
- set udg_d[2] = GetSpellTargetLoc()
- set bj_forLoopAIndex = 1
- set bj_forLoopAIndexEnd = 10
- loop
- exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
- set udg_zs[1] = ( GetForLoopIndexA() * 36 )
- call CreateNUnitsAtLocFacingLocBJ( 1, 'e000', GetOwningPlayer(udg_dw[1]), PolarProjectionBJ(udg_d[2], I2R(150), I2R(udg_zs[1])), udg_d[2] )
- set udg_dw[GetForLoopIndexA()] = GetLastCreatedUnit()
- set bj_forLoopAIndex = bj_forLoopAIndex + 1
- endloop
- set udg_brz = false
- call EnableTrigger( gg_trg_hqs1 )
- endfunction
- //===========================================================================
- function InitTrig_hqs takes nothing returns nothing
- set gg_trg_hqs = CreateTrigger( )
- call TriggerRegisterAnyUnitEventBJ( gg_trg_hqs, EVENT_PLAYER_UNIT_SPELL_EFFECT )
- call TriggerAddCondition( gg_trg_hqs, Condition( function Trig_hqs_Conditions ) )
- call TriggerAddAction( gg_trg_hqs, function Trig_hqs_Actions )
- endfunction
复制代码- function Trig_hqs1_Func002Func002C takes nothing returns boolean
- if ( not ( udg_zs[2] >= 400 ) ) then
- return false
- endif
- if ( not ( udg_brz == false ) ) then
- return false
- endif
- return true
- endfunction
- function Trig_hqs1_Func002Func003Func002C takes nothing returns boolean
- if ( not ( udg_zs[3] <= 0 ) ) then
- return false
- endif
- return true
- endfunction
- function Trig_hqs1_Func002Func003C takes nothing returns boolean
- if ( not ( udg_brz == true ) ) then
- return false
- endif
- return true
- endfunction
- function Trig_hqs1_Actions takes nothing returns nothing
- set bj_forLoopAIndex = 1
- set bj_forLoopAIndexEnd = 10
- loop
- exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
- set udg_zs[1] = ( GetForLoopIndexA() * 36 )
- if ( Trig_hqs1_Func002Func002C() ) then
- set udg_brz = true
- else
- endif
- if ( Trig_hqs1_Func002Func003C() ) then
- if ( Trig_hqs1_Func002Func003Func002C() ) then
- call DisableTrigger( GetTriggeringTrigger() )
- set udg_brz = false
- return
- else
- set udg_zs[2] = ( udg_zs[2] - 20 )
- call SetUnitFlyHeight( udg_dw[GetForLoopIndexA()], I2R(50), I2R(2000) )
- endif
- else
- set udg_zs[2] = ( udg_zs[2] + 1 )
- set udg_zs[4] = ( udg_zs[4] + 1 )
- call SetUnitFlyHeight( udg_dw[GetForLoopIndexA()], I2R(500), I2R(200) )
- endif
- set udg_zs[3] = ( udg_zs[2] + 150 )
- set udg_zs[5] = ( udg_zs[1] + udg_zs[4] )
- set udg_d[3] = PolarProjectionBJ(udg_d[2], I2R(udg_zs[3]), I2R(udg_zs[5]))
- call SetUnitPositionLocFacingLocBJ( udg_dw[GetForLoopIndexA()], udg_d[3], udg_d[2] )
- set bj_forLoopAIndex = bj_forLoopAIndex + 1
- endloop
- endfunction
- //===========================================================================
- function InitTrig_hqs1 takes nothing returns nothing
- set gg_trg_hqs1 = CreateTrigger( )
- call DisableTrigger( gg_trg_hqs1 )
- call TriggerRegisterTimerEventPeriodic( gg_trg_hqs1, 0.06 )
- call TriggerAddAction( gg_trg_hqs1, function Trig_hqs1_Actions )
- endfunction
复制代码
只能这样了 不会转编码,不会用触发代码.
set udg_zs[2] = ( udg_zs[2] - 20 ) |
|