饥荒怎么开瞬移 饥荒瞬移mod

饥荒游戏中有些开了全图的玩家想要瞬移,那么,如何达到这个效果呢?感兴趣的玩家快来学习一下吧。

14575144373994428

打开dont_starve\data\scripts\main.lua
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
)

原创文章,作者:spike,如若转载,请注明出处:http://www.kz168.cn/52623.html