function Trig_a_Actions takes nothing returns nothing // 例行要打既野 唔深入教 所以唔講住
if(not(GetItemUserData(GetManipulatedItem())>=1))then
// 如果岩先汁到果個物品既自訂數值唔係大於或等於1 咁就執行
call SetItemUserData(GetManipulatedItem(),udg_b)
// call set岩岩汁起果個物品既自訂數值為udg_b
set udg_b=(udg_b+1)
endif
if(not(udg_a[GetItemUserData(GetManipulatedItem())]>=1))then
// 如果udg_a[岩岩汁起果個物品既自訂數值]唔係大於或等於1 咁就執行
set udg_a[GetItemUserData(GetManipulatedItem())]=GetConvertedPlayerId(GetTriggerPlayer())
// set udg_a[岩岩汁起果個物品既自訂數值]=拎觸發者玩家既玩家編碼
endif
if(not(udg_a[GetItemUserData(GetManipulatedItem())]==GetConvertedPlayerId(GetTriggerPlayer())))then
// 同上面個 set udg_a ..... 差唔多
call UnitRemoveItemSwapped(GetManipulatedItem(),GetManipulatingUnit())
// 把岩先汁起既物品 係岩先汁起物品果隻部隊 身上掉下來
endif
endfunction // 觸發完結必備
(其實下面呢個我冇用jass寫 哈哈哈哈 因為we有d野改唔到 唔可以亂搞)
function InitTrig_a takes nothing returns nothing
set gg_trg_a=CreateTrigger() // 設定觸發器 gg_trg_a 為開啟 (gg_trg_a 呢d名 係we到改唔到第2個 所以我冇改到)
call TriggerRegisterAnyUnitEventBJ(gg_trg_a,EVENT_PLAYER_UNIT_PICKUP_ITEM)
// 任何部隊發生任何事件 (gg_trg_a,任何玩家部隊拎起野)
call TriggerAddAction(gg_trg_a,function Trig_a_Actions)
// 增加行動 ( 和gui入面既"調用觸發"差不多 不過如果學jass 你就很少用這的了 )
endfunction