#Swimming mechanics

1 messages · Page 1 of 1 (latest)

clear zodiac
#

Hello, I’m a newbie bridgev2 user (very new), and I’m looking forward to trying to make an invisible fluid block that does spread but still makes the player swim. I got this from the wiki:

if (
fluids.includes(world.getDimension(player.dimension.id).getBlock({ ...player.location, y: player.location.y + 1 }).typeId) ||
fluids.includes(world.getDimension(player.dimension.id).getBlock(player.location).typeId)
) {
player.addEffect("slow_falling", 4, { amplifier: player.isSneaking ? 1 : 2, showParticles: false });
if (player.isJumping) {
player.addEffect("levitation", 3, { amplifier: 2, showParticles: false });
}
}
, and I’m trying to add it into the coding, but my caveman brain doesn’t know how, please help. I want the player to be able to be able to have the swimming animation and all while with the fluid too.

remote wadi
#

looks like a script

#

so maybe it's something u have to put in like main.js or something, im not very good with scripting but that for sure looks like java script so that's what im assuming it is

clear zodiac
#

interesting,

finite lodge
#

Someone shared a fluid template in #1072983602821861426 some time ago

#

Could be useful

clear zodiac
#

interesting

#

Btw if i cant do this whole swimming mechanics thing

#

I’m aiming to do a slow gliding mechanic instead, similar to an elytra, but slower, and has a custom and or a vanilla animation, that of a swimming animation for the vanilla alternative.