當前位置:編程學習大全網 - 編程軟體 - 饑荒——地圖全開MOD方法

饑荒——地圖全開MOD方法

看到不少人求地圖全開MOD,分享個方法,理論全版本通用,至少從4.10開始之後的中英文版本適用。

找到遊戲中main.lua,文件,地址在dont_starvedatascripts,用記事本打開,拖到最後,在最後壹行(即ModManager:LoadMods()——這壹行前面)添加以下代碼,保存,進遊戲後ctrl+1地圖全開,ctrl+2瞬移到鼠標所在位置。建議修改前保存原文件!!!

--地圖全開

TheInput:AddKeyUpHandler(KEY_1, function()

if TheInput:IsKeyDown(KEY_CTRL) then

local MainCharacter = TheSim:FindFirstEntityWithTag("player")

local map = TheSim:FindFirstEntityWithTag("minimap")

if MainCharacter and map then

local x, y, z = MainCharacter.Transform:GetWorldPosition()

map.MiniMap:ShowArea(x, y, z, 10000)

end

end

end

);

--傳送

TheInput:AddKeyUpHandler(KEY_2, function()

if TheInput:IsKeyDown(KEY_CTRL) then

local player = TheSim:FindFirstEntityWithTag("player");

player.Transform:SetPosition(TheInput:GetMouseWorldPos():Get())

end

end

)

  • 上一篇:機甲狂龍遙控器怎麽配對
  • 下一篇:智能360度舞蹈特技機器人音樂,燈光,強風,炫目的舞者,機器裏唱的是什麽歌?
  • copyright 2024編程學習大全網