饑荒聯機版

饑荒聯機版

Tropical Experience | SW HAM Biomes : From Beyond
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