Bug whit sounds and a random procedure selector

Started by a guy called l… on Sat, 11/27/2021 - 23:44

Topic category: Help with modding (Java Edition)

Last seen on 17:37, 28. Jan 2022
Joined Jan 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Bug whit sounds and a random procedure selector
Sat, 11/27/2021 - 23:44

I have a mod that add pills of the game "The binding of Isaac"

This pills work simple, you use one, hoy see the effect and your name in chat.

Also you hear a voice that say what pill Is

My problem Is whit a special pill calles gold pill, that whit a random selector make one of the 17 effects, the procedure Is simple

(This, but 17 times)

When variable ≥ X and variable ≤ X do

Call procedure "insert pill effect"

Set cooldown to this item to 10

Everting fine, the pill effect Is Random, gives you the effect, your name and the effect apparear on the chat...

But the sound work bad, taking a random sound and not the one selected on the procedure, the problem Is the calle procedure part, when i calle the procedure, i call:

"Insert effect"

Say on chat "player" as get "pill effect"

If client side only:

Play sound "good/bad/neutral pill"

Play sound "pill effect"

 

So, it dont have Sense for me, why if I calle the entire procedure, i Heard a random sound?

I test using NTB variables, player variables and private variables. No one work