#✅ | Scoreboard to progress bar

1 messages · Page 1 of 1 (latest)

fluid viper
#

I need to put the content of an scoreboard into the progress bar of my hud. It should be able to update at the same time as the scoreboard

jagged kestrelBOT
#

Hi! Please first select which type of question you want to ask:

  • "Normal Question" is enough for most questions. If you are unsure, you should choose this mode. It provides quick and accurate answers to your questions and problems.
  • "Complex Task" is for very complex questions and multi-step tasks. For example, questions involving complex action script, requirement, or placeholder logic. Normal users will almost never need this. Getting answers takes much longer here.

It is not possible for anybody to send messages in this thread before selecting a mode.

Selected mode: 💬 Normal Question

jagged kestrelBOT
# fluid viper I need to put the content of an scoreboard into the progress bar of my hud. It s...

Hey 🙂 I don’t see a documented built-in placeholder in the docs that reads a scoreboard value directly into a Progress Bar.

So the safe answer is: not directly, at least not from the documentation I have.

What you can do instead is this:

  • Get the scoreboard value into a FancyMenu variable
  • Then set the Progress Bar value to that variable with a placeholder like:
    {"placeholder":"getvariable","values":{"name":"your_variable_name"}}

That way the bar can update whenever the variable updates.

If your score is coming from:

  • a server → you could send it to the client with FM Data and store it in a variable
  • a command result / system message → you may be able to catch it with a listener and then write it into a variable

For the progress bar itself, FancyMenu’s Progress Bar supports placeholders in its value field, so the variable route is the intended way 👍

If you want, send me:

  1. what scoreboard you mean exactly
  2. whether it’s singleplayer or multiplayer
  3. where the score comes from

…and I can tell you the cleanest documented way to wire it up 🎮

fluid viper
#

is a custom scoreboard (dummy) and its supposed to be updated for every player individually. What commands shoulld i use to put it in the /fmdata

jagged kestrelBOT
# fluid viper is a custom scoreboard (dummy) and its supposed to be updated for every player i...

Hey 🙂 ¿prefieres que sigamos en español? 🇪🇸

About the scoreboard part: from the docs I can confirm the FM Data command syntax is:

/fmdata send <target_player> <data_identifier> <string_data>

For per-player updates, the usual target is @s while running the command as each player, for example:

execute as @a run fmdata send @s hud.score <value>

But I need to be careful here: the docs I have do not show a built-in way to turn a scoreboard value into that <value> string inside the command itself. So I can’t honestly give you a full exact command chain for “dummy scoreboard -> FM Data” without guessing. 🙏

What I can say for sure:

  • target_player can be @a, @p, @s, or a player name
  • FM Data is just text-based, so the score has to be converted to text somewhere before sending
  • then your HUD can read it with {"placeholder":"getvariable","values":{"name":"your_variable"}} if you store it in a FancyMenu variable, or by reacting to the incoming FM Data on the client

If you want, send me:

  1. your Minecraft version
  2. whether this is singleplayer or multiplayer
  3. how the dummy scoreboard is updated right now

…and I’ll tell you the cleanest setup I can based on the docs 📋💡

fluid viper
#

in the variable name and value to check for
como pongo un mayor que tal numero?

jagged kestrelBOT
# fluid viper in the variable name and value to check for como pongo un mayor que tal numero?

Sí 🙂 para eso no uses Is Variable Value, porque ese solo comprueba igualdad exacta.

Para “mayor que X”, usa el requisito:

Is Number

Y ahí pon:

  • Comparison mode: bigger-than
  • Number: el valor actual de tu variable
  • Compare with: el número que quieres superar

Ejemplo:

  • variable: coins
  • quieres comprobar si es mayor que 10

Entonces:

  • Number: {"placeholder":"getvariable","values":{"name":"coins"}}
  • Compare with: 10

O sea, Is Variable Value sería para cosas como:

  • coins:10 → solo si vale exactamente 10

Pero para:

  • “si coins es mayor que 10” → Is Number + bigger-than

Si quieres, te puedo escribir el ejemplo exacto según si lo estás haciendo en un:

  • IF Statement
  • Loading Requirement
  • botón / slider / ticker

y te lo dejo listo para copiar 📋🙂

fluid viper
#

osea is number + bigger-than de mi variable es mayor a 1 puedo hacer que se reproduzca un audio en spiffy?

jagged kestrelBOT
# fluid viper osea is number + bigger-than de mi variable es mayor a 1 puedo hacer que se repr...

Sí 🙂 y antes de seguir: ¿prefieres que hablemos en español? 🇪🇸

Sobre lo del audio: con la documentación que tengo, no veo una función de SpiffyHUD que reproduzca audio directamente como parte de un elemento HUD.

Lo que sí veo es:

  • Is Number + bigger-than te sirve para comprobar tu variable
  • pero para reproducir sonido, lo documentado en FancyMenu es usar un elemento Audio y controlarlo con acciones / scripts

Así que, en corto:

  • la condición sí
  • el audio directamente desde SpiffyHUD, no lo tengo documentado

Si quieres hacerlo de forma “limpia”, lo normal sería:

  1. Guardar tu valor en una variable
  2. Usar una condición Is Number con bigger-than
  3. Disparar una acción de audio en FancyMenu si la lógica se cumple

Pero no quiero inventarte un flujo exacto para Spiffy si no está en la doc 😅

Si me dices:

  • si lo quieres hacer en un botón, ticker o requisito
  • y qué versión de FancyMenu/Spiffy usas

te digo la opción que sí encaja con lo documentado 🎧📘

fluid viper
#

ticker con script de play audio denntro de su respectivo if

jagged kestrelBOT
# fluid viper ticker con script de play audio denntro de su respectivo if

Sí, eso sí se puede 👍🎵

Con lo que aparece en la documentación de FancyMenu, la idea sería:

  • poner un Ticker
  • dentro del ticker, usar un IF statement
  • en ese IF, comprobar tu variable con:
    • Is Number
    • bigger-than
  • y dentro del bloque IF, ejecutar la acción Play Audio

Pero ojo con algo importante: si el ticker sigue corriendo y la condición sigue siendo verdadera, el audio se va a reproducir una y otra vez 😅

Para evitar eso, lo más limpio sería hacer un “candado” con otra variable, por ejemplo:

  1. score > 1
  2. audio_played = false
  3. si ambas cosas se cumplen:
    • Play Audio
    • Set Variable Valueaudio_played:true

Así el sonido solo se reproduce una vez cuando se cumple la condición.

Un ejemplo de lógica sería:

  • IF score > 1 AND audio_played == false
    • Play Audio
    • Set Variable audio_played:true

Y si quieres que luego pueda volver a sonar otra vez, tendrías que volver a poner audio_played:false cuando te interese.

Si quieres, te puedo escribir el script exacto del ticker paso por paso, usando los nombres de los menús y requisitos tal como salen en FancyMenu 📋🙂

fluid viper
#

se me ocurrio usar un while con la condicion de que la variable este activa (mayor a 1) y dentro reproduzca el sonido con un bloque de delay correspondiente a la duracion del sonido

jagged kestrelBOT
# fluid viper se me ocurrio usar un while con la condicion de que la variable este activa (may...

¿Prefieres que sigamos en español? 🇪🇸

Sí, tu idea puede funcionar 🙂 pero te diría que no es la opción más estable.

Según la doc:

  • While repite acciones mientras la condición sea verdadera
  • pero tiene un timeout interno para evitar bucles infinitos
  • y FancyMenu recomienda usar Schedulers para lógica repetida en segundo plano

Entonces:

  • para algo corto o temporal, tu idea con While + Delay + Play Audio está bien
  • para algo que puede quedarse mucho tiempo activo, mejor un Scheduler o un Ticker con lógica de control

Lo importante es esto:

  • si haces While variable > 1
  • y dentro pones Play Audio
  • y luego un Delay igual a la duración del sonido

entonces sí, puedes conseguir que el sonido se repita mientras la variable siga activa 🎧

Pero ojo con dos cosas:

  1. si la duración del Delay no coincide bien, puedes tener huecos o solapes
  2. si el While dura demasiado, puede cortarse por el timeout interno

Mi recomendación práctica sería:

  • si quieres que suene “mientras esté activo” → usa un Scheduler
  • si quieres que suene una vez al cumplir la condición → usa IF + una variable de bloqueo
  • si quieres probar rápido → While + Delay también vale

Si quieres, te escribo la estructura exacta del script con:

  • While
  • Delay
  • Play Audio
  • y la condición Is Number / bigger-than

para que lo copies tal cual 📋🙂

jagged kestrelBOT
#

✅ | Scoreboard to progress bar