#Help me! Java Bow Ding

1 messages · Page 1 of 1 (latest)

zinc thunderBOT
#

Suggestion for @mental lantern

Description
Creates a 'ding' sound when a player hits the other player with a bow.

Credits
These scripts were written by JaylyDev

mental lantern
#

@covert bison

covert bison
#

No problem!

mental lantern
covert bison
#

I do not understand that language

fiery jewelBOT
#
Bedic Mag

bro no function (doesn't work) I think it's a 1.20 error

green bobcat
#

He's saying it doesn't work đŸ€·â€â™‚ïž

fiery jewelBOT
#
ă€ŽđŸ§§ă€âŽŹđ“—đ“€đ“–đ“đ“Łđ“žâŽš

1117070196771934228

#
ă€ŽđŸ§§ă€âŽŹđ“—đ“€đ“–đ“đ“Łđ“žâŽš

He's saying it doesn't work

zinc thunderBOT
#

Health display
Display player's health below player's name tag using scripts.

shadow crane
#

Then do you need a script that plays a sound when you hit a player with an arrow? (Entonces, Âżnecesitas un script que reproduzca un sonido cuando golpees a un jugador con una flecha?)

#

That is very easy (Eso es muy fĂĄcil)

shadow crane
#
world.afterEvents.projectileHit.subscribe(event => {
    const { source: player, projectile } = event;
    const playerHit = event.getEntityHit()?.entity;
    const playerHitHealth = playerHit.getComponent("minecraft:health");
    const soundOptions = { volume: 0.4, pitch: 0.5 };
    if(playerHit?.typeId !== "minecraft:player" || 
        player.typeId !== "minecraft:player" || 
        projectile.typeId !== "minecraft:arrow") return;
    
    player.sendMessage(`§7Has dado >>§b${playerHit.name} §l§aHP§r§f: §c${Math.round(playerHitHealth.current) / 2}§f/§a${Math.round(playerHitHealth.value) / 2}`);
    player.playSound("random.orb");
});```
mental lantern
#

thanks

#

your code works, the other doesn't

shadow crane
#

Yes but wait a moment, I forgot something >> (Sí, pero espera un momento, olvidé algo).

mental lantern
#

ok

shadow crane
#

Okay, I speak spansih. What did you say? >> (Bien, hablo español. ¿Qué dijiste?).

mental lantern
#

que

#

no suelta error

#

pero no suena

mental lantern
#

sera por la 1.20 no se

shadow crane
#

A ver, hablemos por MD. De hecho este servidor lleva en sus reglas "Habla solo en Inglés o algo así".