Don't Starve Together

Don't Starve Together

Tropical Experience | SW HAM Biomes : From Beyond
Cuikui Jul 29, 2024 @ 3:02pm
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.
< >
Showing 1-1 of 1 comments
好学のmomo  [developer] Jul 30, 2024 @ 7:46pm 
it worked!!!
Thank you very much, friend!:steamthumbsup::steamhappy:
< >
Showing 1-1 of 1 comments
Per page: 1530 50