一:事件
1.1 事件 - 普通
1.1.1 事件 - 普通 - 地图初始话
PS: 在代码中其实就是每有加任何事件,直接触发
function Trig_ZFLearn01TrigerActions takes nothing returns nothing
call YDWEDisplayChat( Player(0), 0, "Hello World" )
endfunction
//===========================================================================
function InitTrig_ZFLearn01Triger takes nothing returns nothing
set gg_trg_ZFLearn01Triger = CreateTrigger()
call TriggerAddAction(gg_trg_ZFLearn01Triger, function Trig_ZFLearn01TrigerActions)
endfunction
1.2 事件 - 硬件
1.2.1 事件 - 硬件 - 鼠标滚轮事件
call DzTriggerRegisterMouseWheelEventTrg( gg_trg_ZFLearn01Triger )
function Trig_ZFWheelTriggerActions takes nothing returns nothing
// 获取滚轮delta
local integer wheelDelta = DzGetWheelDelta()
call YDWEDisplayChat( Player(0), 0, "滚轮 wheelDelta=" + I2S(wheelDelta) )
endfunction
//===========================================================================
function InitTrig_ZFWheelTrigger takes nothing returns nothing
set gg_trg_ZFLearn01Triger = CreateTrigger()
// 鼠标滚轮事件
call DzTriggerRegisterMouseWheelEventTrg( gg_trg_ZFLearn01Triger )
call TriggerAddAction(gg_trg_ZFLearn01Triger, function Trig_ZFWheelTriggerActions)
endfunction