安装 Steam
登录
|
语言
繁體中文(繁体中文)
日本語(日语)
한국어(韩语)
ไทย(泰语)
български(保加利亚语)
Čeština(捷克语)
Dansk(丹麦语)
Deutsch(德语)
English(英语)
Español-España(西班牙语 - 西班牙)
Español - Latinoamérica(西班牙语 - 拉丁美洲)
Ελληνικά(希腊语)
Français(法语)
Italiano(意大利语)
Bahasa Indonesia(印度尼西亚语)
Magyar(匈牙利语)
Nederlands(荷兰语)
Norsk(挪威语)
Polski(波兰语)
Português(葡萄牙语 - 葡萄牙)
Português-Brasil(葡萄牙语 - 巴西)
Română(罗马尼亚语)
Русский(俄语)
Suomi(芬兰语)
Svenska(瑞典语)
Türkçe(土耳其语)
Tiếng Việt(越南语)
Українська(乌克兰语)
报告翻译问题








代码示例
init.lua文件
function OnPlayerSpawned(player_entity)
GamePrint("$amap_open")
dofile("mods/advanced_map/button.lua")
DisposeMap()
EntityAddComponent( player_entity, "VariableStorageComponent", { _tags = "LastTeleportFram",value_int=0} )
end
map.lua文件
--mouse comp
local ctrl_components = EntityGetComponentIncludingDisabled( player_id, "ControlsComponent" )
local right_click = false
local right_clickfram =0
local mouse_x,mouse_y,map_gui_x,map_gui_y
if (ctrl_components ~= nil) then
edit_component2(player_id,"ControlsComponent",function (comp,vars)
right_click = ComponentGetValue2( comp, "mButtonDownRightClick")
right_clickfram = ComponentGetValue2( comp, "mButtonFrameRightClick")
mouse_x,mouse_y = ComponentGetValue2( comp, "mMousePosition")
map_gui_x,map_gui_y = ComponentGetValue2( comp, "mMousePositionRaw")
end )
end
--teleport
if right_click and ModSettingGet("advanced_map.teleport") then
local compClick = EntityGetFirstComponentIncludingDisabled( player_id, "VariableStorageComponent" ,"LastTeleportFram")
local lastright_clickfram = ComponentGetValue2(compClick,"value_int") or 0
if (right_clickfram-lastright_clickfram)>2 then
EntitySetTransform(player_id, msx, msy)
timer = 0
GamePrint( GameTextGet("$log_teleported").." "..tostring(right_clickfram)..tostring(lastright_clickfram )..tostring(msx).." , "..tostring(msy) )
ComponentSetValue2( compClick, "value_int", right_clickfram )
end
end