#(queen_luna) npc play sound

52 messages · Page 1 of 1 (latest)

grim beacon
#

Is there a way to set a command on an NPC so when a player clicks on it to display the text, it will play the sound?

neat remnantBOT
#

(queen_luna) npc play sound

neat remnantBOT
#

Hi I'm AutoThreadBot! Don't mind me, I'll just be adding the helper team to this thread so they can see it. A human will get to you soon.

grim beacon
#

the general MC command for playing a sound, with the sound I would like is

/playsound minecraft:entity.player.levelup ambient @p

ornate terrace
#

!clickcommand

digital apexBOT
ornate terrace
#

^ commands added all run at the same time on click by default

#

just add both

grim beacon
#

I have looked at this before, is there a specific format I should try?

ornate terrace
#

I'm not sure what you're asking?

grim beacon
#

theres multiple commands on this page, which one should I be looking at for the playsound result?

ornate terrace
#

if you don't know how to add commands at all, just read the first paragraph

grim beacon
#

ik how to add commands, the sound isnt playing when it says its been added

ornate terrace
#

Run the exact same command from console, replacing <p> with your name

#

Does it work then?

grim beacon
#

do I use the command add as normal or the command with add msg?

#

ok, so, its playing the sound, but it displays the text "played sound (sound name) to (user), is there a way to hide this?

ornate terrace
#

In console or in game chat?

grim beacon
#

game chat

ornate terrace
#

Sounds like you're running the command as the player, you shouldn't do that

#

run it as console

grim beacon
#

do I need to select the npc again?

ornate terrace
#

To edit its commands? yes

#

NPCs stay selected until you log off or select a different one though

grim beacon
#

./npc command add -p playsound minecraft:entity.player.levelup ambient @p

does this look right?

ornate terrace
#

-p makes it run as player, don't do that

#

and use <p> instead of @p. they do the same thing, but <p> is the correct way

grim beacon
#

ok, ill try that

#

when I run it in the console it doesnt show up on the list of commands attached to the npc, I think I might need to select it first

#

what is the command for selecting an NPC?

ornate terrace
#

/npc select

#

you can also click it with a stick

grim beacon
#

odd, it doesnt play the sound at all, iv tried both console and in-game

ornate terrace
#

I'm not very familiar with the playsound command, but if you can get it working in console, you can just transfer it to the npc

grim beacon
#

/npc command add -p playsound minecraft:entity.player.levelup ambient @p <-- it works with this command

not with

/npc command add playsound minecraft:entity.player.levelup ambient <p>

ornate terrace
#

This isn't related to Citizens, it's just the playsound syntax

#

you can find out how to do it in the minecraft wiki, just replace @p with <p>

grim beacon
#

I dont see anything about replacing @p with <p>

#

theres /execute for playing sounds too

ornate terrace
#

Make a command that plays the sound as you want it from console, and i can help you put it in the npc

grim beacon
#

this one works ->

/execute at @s run playsound minecraft:entity.player.levelup ambient @s

#

now, just to attach it to an npc

ornate terrace
#

Okay, /npc command add execute at <p> run playsound minecraft:entity.player.levelup ambient <p>

grim beacon
#

It still has the text in-game, [server: [played sound (sound name) to (user)]

#

.. .hmm.. .tricky

#

maybe try only playsound?

#

is there a way to make the NPC's themselves silent? not make noise?

queen walrus
#

Yes you can also use /npc playsound

#

/npc sound -s will make them silent

shadow cometBOT
#
Thread Closing Reminder

Has your issue been resolved, or your question been answered?
If so, please use the </resolved:1028673926114594866> command to close your thread.
Or </invalid:1028673926898909185> if it's not possible to resolve.

If not yet resolved, please reply below to tell us what you still need.

(Note that if there is no reply for a few days, this thread will eventually close itself.)

#

@grim beacon