选择难度的方法
function Trig_seletoneActions takes nothing returns nothing
call DialogSetMessage(udg_select,"TRIGSTR_12525")
set udg_selevt[0]=DialogAddButtonBJ(udg_select,"TRIGSTR_12526")
set udg_selevt[1]=DialogAddButtonBJ(udg_select,"TRIGSTR_12528")
set udg_selevt[2]=DialogAddButtonBJ(udg_select,"TRIGSTR_12529")
set udg_selevt[3]=DialogAddButtonBJ(udg_select,"TRIGSTR_12944")
set udg_selevt[4]=DialogAddButtonBJ(udg_select,"TRIGSTR_12945")
set udg_selevt[5]=DialogAddButtonBJ(udg_select,"TRIGSTR_12946")
set udg_selevt[6]=DialogAddButtonBJ(udg_select,"TRIGSTR_12947")
call DialogDisplay(Player(0),udg_select,true)
endfunction
function InitTrig_seletone takes nothing returns nothing
set gg_trg_seletone=CreateTrigger()
call TriggerRegisterTimerEventSingle(gg_trg_seletone,1.00)
call TriggerAddAction(gg_trg_seletone,function Trig_seletoneActions)
endfunction
设定不同难度,怪物使用不同科技水平的方法
function InitTrig_selettwo takes nothing returns nothing
set gg_trg_selettwo=CreateTrigger()
call TriggerRegisterDialogEvent(gg_trg_selettwo,udg_select)
call TriggerAddAction(gg_trg_selettwo,function Trig_selettwoActions)
endfunction
function Trig_selettwoActions takes nothing returns nothing
if ((GetClickedButtonBJ()==udg_selevt[0])) then
set udg_dyunitupA=100.00
else
if ((GetClickedButtonBJ()==udg_selevt[1])) then
set udg_dyunitupA=95.00
call SetPlayerTechResearchedSwap('R00U',1,Player(11))
call SetPlayerTechResearchedSwap('R00W',1,Player(11))
else
if ((GetClickedButtonBJ()==udg_selevt[2])) then
set udg_dyunitupA=90.00
call SetPlayerTechResearchedSwap('R00U',5,Player(11))
call SetPlayerTechResearchedSwap('R00W',5,Player(11))
else
if ((GetClickedButtonBJ()==udg_selevt[3])) then
set udg_dyunitupA=85.00
call SetPlayerTechResearchedSwap('R00U',10,Player(11))
call SetPlayerTechResearchedSwap('R00W',10,Player(11))
else
if ((GetClickedButtonBJ()==udg_selevt[4])) then
set udg_dyunitupA=80.00
call SetPlayerTechResearchedSwap('R00U',15,Player(11))
call SetPlayerTechResearchedSwap('R00W',15,Player(11))
else
if ((GetClickedButtonBJ()==udg_selevt[5])) then
set udg_dyunitupA=75.00
call SetPlayerTechResearchedSwap('R00U',20,Player(11))
call SetPlayerTechResearchedSwap('R00W',20,Player(11))
else
if ((GetClickedButtonBJ()==udg_selevt[6])) then
set udg_dyunitupA=70.00
call SetPlayerTechResearchedSwap('R00U',25,Player(11))
call SetPlayerTechResearchedSwap('R00W',25,Player(11))
endif
endif
endif
endif
endif
endif
endif
call DisableTrigger(gg_trg_selettwo)
endfunction
怪物使用的科技
R00U
R00W
call SetPlayerTechResearchedSwap('R00U',1,Player(0))
call SetPlayerTechResearchedSwap('R00W',1,Player(0))
call SetPlayerTechResearchedSwap('R00U',1,Player(1))
call SetPlayerTechResearchedSwap('R00W',1,Player(1))
call SetPlayerTechResearchedSwap('R00U',1,Player(2))
call SetPlayerTechResearchedSwap('R00W',1,Player(2))
call SetPlayerTechResearchedSwap('R00U',1,Player(3))
call SetPlayerTechResearchedSwap('R00W',1,Player(3))
call SetPlayerTechResearchedSwap('R00U',1,Player(4))
call SetPlayerTechResearchedSwap('R00W',1,Player(4))
call SetPlayerTechResearchedSwap('R00U',1,Player(5))
call SetPlayerTechResearchedSwap('R00W',1,Player(5))
call SetPlayerTechResearchedSwap('R00U',1,Player(11))
call SetPlayerTechResearchedSwap('R00W',1,Player(11))
设定结盟
InitCustomTeams
添加单位
CreateBuildingsForPlayer11
玩家初始位置
call DefineStartLocation(0,-5504.0,-6528.0)
call DefineStartLocation(1,-7168.0,-11328.0)
call DefineStartLocation(2,-5120.0,-11328.0)
call DefineStartLocation(3,3840.0,-11456.0)
call DefineStartLocation(4,6016.0,-11456.0)
call DefineStartLocation(5,4416.0,-6784.0)
call DefineStartLocation(6,-9536.0,6336.0)
call DefineStartLocation(7,7168.0,-3968.0)
call DefineStartLocation(8,-9600.0,-4096.0)
call DefineStartLocation(9,9024.0,5440.0)
出兵的方法
function InitTrig_jggone takes nothing returns nothing
set gg_trg_jggone=CreateTrigger()
call TriggerRegisterTimerEventSingle(gg_trg_jggone,100.00)
call TriggerAddAction(gg_trg_jggone,function Trig_jggoneActions)
endfunction
function Trig_jggoneActions takes nothing returns nothing
call StartTimerBJ(udg_JST,false,120.00)
set udg_JSTwindows=CreateTimerDialogBJ(udg_JST,("第"+(I2S(1)+"波 - 倒计时:")))
call YDWEPolledWaitNull(120.00)
set udg_ZG01=1
loop
exitwhen udg_ZG01>46
if ((udg_ZG01==4)) then
call TriggerExecute(gg_trg_twoOTjggo)
endif
set udg_ZG02=1
loop
exitwhen udg_ZG02>30
if ((udg_xxout01!=8)) then
call CreateNUnitsAtLoc(1,udg_JKG[(udg_ZG01-1)],Player(11),udg_JKGKC01,bj_UNIT_FACING)
endif
if ((udg_xxout02!=8)) then
call CreateNUnitsAtLoc(1,udg_JKG[(udg_ZG01-1)],Player(11),udg_JKGKC02,bj_UNIT_FACING)
endif
if ((udg_xxout03!=8)) then
call CreateNUnitsAtLoc(1,udg_JKG[(udg_ZG01-1)],Player(11),udg_JKGKC03,bj_UNIT_FACING)
endif
if ((udg_xxout04!=8)) then
call CreateNUnitsAtLoc(1,udg_JKG[(udg_ZG01-1)],Player(11),udg_JKGKC04,bj_UNIT_FACING)
endif
call YDWEPolledWaitNull(2.00)
set udg_ZG02=udg_ZG02+1
endloop
if ((udg_ZG01==8)) then
call CreateNUnitsAtLoc(1,'u00S',Player(11),udg_JKGKC01,bj_UNIT_FACING)
call CreateNUnitsAtLoc(1,'u00S',Player(11),udg_JKGKC02,bj_UNIT_FACING)
call CreateNUnitsAtLoc(1,'u00S',Player(11),udg_JKGKC03,bj_UNIT_FACING)
call CreateNUnitsAtLoc(1,'u00S',Player(11),udg_JKGKC04,bj_UNIT_FACING)
endif
if ((udg_ZG01==16)) then
call CreateNUnitsAtLoc(1,'eshd',Player(11),udg_JKGKC01,bj_UNIT_FACING)
call CreateNUnitsAtLoc(1,'eshd',Player(11),udg_JKGKC02,bj_UNIT_FACING)
call CreateNUnitsAtLoc(1,'eshd',Player(11),udg_JKGKC03,bj_UNIT_FACING)
call CreateNUnitsAtLoc(1,'eshd',Player(11),udg_JKGKC04,bj_UNIT_FACING)
endif
if ((udg_ZG01==28)) then
call CreateNUnitsAtLoc(1,'nbwm',Player(11),udg_JKGKC01,bj_UNIT_FACING)
call CreateNUnitsAtLoc(1,'nbwm',Player(11),udg_JKGKC02,bj_UNIT_FACING)
call CreateNUnitsAtLoc(1,'nbwm',Player(11),udg_JKGKC03,bj_UNIT_FACING)
call CreateNUnitsAtLoc(1,'nbwm',Player(11),udg_JKGKC04,bj_UNIT_FACING)
endif
call YDWEPolledWaitNull(100.00)
call StartTimerBJ(udg_JST,false,120.00)
call TimerDialogSetTitle(udg_JSTwindows,("第"+(I2S((udg_ZG01+1))+"波 - 倒计时:")))
call YDWEPolledWaitNull(120.00)
if ((udg_TK==4)) then
set udg_ZG01=61
endif
set udg_ZG01=udg_ZG01+1
endloop
call YDWEPolledWaitNull(240.00)
call EnableTrigger(gg_trg_ultimatejg1)
call EnableTrigger(gg_trg_ultimatejg2)
call DisableTrigger(gg_trg_jggone)
endfunction