今天我用编辑器打开LOST TEMPER这个地图,往里面加了一个触发器“玩家1输入信息‘123’完全匹配,玩家1金钱 to 1000000”,触发器的名字是"jiaqian", 然后导出脚本,再用MPQ把脚本导入原来的地图,重新压缩,地图测试的时候发现玩家1输入“123”是可以得到金钱1000000的,完了我就换了一种方法改,我把备份的LOSE TEMPER 用HWM解压出war3map.j这个文件,然后往里面加了一个触发器
trigger gg_trg_jiaqian=null, 然后再加入
Trigger: jiaqian
//===========================================================================
function Trig_jiaqian_Actions takes nothing returns nothing
call SetPlayerStateBJ( Player(0), PLAYER_STATE_RESOURCE_GOLD, 1000000 )
endfunction
//===========================================================================
function InitTrig_jiaqian takes nothing returns nothing
set gg_trg_jiaqian = CreateTrigger( )
call TriggerRegisterPlayerChatEvent( gg_trg_jiaqian, Player(0), "123", true )
call TriggerAddAction( gg_trg_jiaqian, function Trig_jiaqian_Actions )
endfunction
再导入原来的地图,测试的时候怎么就出错了呢???是不是少了什么东西啊??? |