代码来源于“易宁”大佬的分享,仅供学习,不要直接复制粘贴。

原帖链接:http://bbs.3dmgame.com/thread-3859071-1-1.html


 1
 2十八.地图全开(游戏中按Ctrl+1
 3
 4	MT管理器打开游戏目录/assets/DLC0002/scripts/prefabs/player_common.lua文件,在inst:AddComponent("resurrectable")下一行插入以下内容:
 5
 6TheInput:AddKeyUpHandler(KEY_1, function()
 7	if TheInput:IsKeyDown(KEY_CTRL) then
 8	   local map = TheSim:FindFirstEntityWithTag("minimap")
 9	   local x,y,z = GetPlayer().Transform:GetWorldPosition()
10	   map.MiniMap:ShowArea(x, y, z, 10000)
11	end
12end)
13
14	即可在游戏中按Ctrl + 1使地图全开