饥荒联机版

饥荒联机版

热带体验 | 海难哈姆雷特生态:来自域外
Cuikui 2024 年 7 月 29 日 下午 3:02
The rafts and bamboo rafts
I answer here to the question of 好学のmomo:
"The rafts and bamboo rafts have to be three points off the ground before they can jump on. Do you know why? If you know, can you help us solve it?"

The platform is only detected at one point in front of the player, about 4 units away, but the player can only jump if close to the water.
Result: if the platform is too small when the player is close to the water, the detection point overshot the platform and it is not detected.

A solution can be to add more test points:
In locomotor line 1745 you could change to:
if other_platform == nil then
local n_steps = 3
local step = hop_distance / n_steps
for i = 1, n_steps do
destpos_x, destpos_z = forward_x * step * i + mypos_x, forward_z * step * i + mypos_z
other_platform = TheWorld.Map:GetPlatformAtPoint(destpos_x, destpos_z)
print(GetTick(), i, other_platform)
if other_platform then
break
end
end
end

I hope this helps.
< >
正在显示第 1 - 1 条,共 1 条留言
好学のmomo  [开发者] 2024 年 7 月 30 日 下午 7:46 
it worked!!!
Thank you very much, friend!:steamthumbsup::steamhappy:
< >
正在显示第 1 - 1 条,共 1 条留言
每页显示数: 1530 50