Making overlays per Player

Started by Folkpizza on

Topic category: Help with modding (Java Edition)

Last seen on 14:50, 29. Sep 2024
Joined Oct 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Making overlays per Player

I am currently working on a mod that involves a custom bar on the players screen. I have made a texture in an overlay for every bar position (full, 2/3, 1/3, and empty). (Here is the procedure I used to do this. Note half full is 2/3 and that each logic variable that changes to true I have already made procedures to show or hide the accosted texture). I tested this in multiplayer but the overlays overlapped each other with each of the players different values. Is there some way for me to set the overlay to only show to some players, or is there another way to do this. I am okay with coding but might need a little help. Thank you in advance!

Last seen on 03:32, 22. Jul 2024
Joined Oct 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
now that is a Mess of…
Sun, 10/03/2021 - 20:59

now that is a Mess of procedure

dont use logic, why logic? why so many variables?? what???

Last seen on 14:50, 29. Sep 2024
Joined Oct 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
The logic variables are to…
Sun, 10/03/2021 - 21:13

The logic variables are to toggle each part of the bar, like this. Also I have already tested this in single player and it works

Last seen on 03:32, 22. Jul 2024
Joined Oct 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
you are oversimplifying it,…
Sun, 10/03/2021 - 21:29

you are oversimplifying it, on your condition blocks use the Number Variables and delete all the Logic ones

Last seen on 14:50, 29. Sep 2024
Joined Oct 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Okay, I have changed the…
Sun, 10/03/2021 - 22:09

Okay, I have changed the overlays to be based on the value of the number variable. (Here)

Last seen on 03:32, 22. Jul 2024
Joined Oct 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
not sure if that works, to…
Sun, 10/03/2021 - 22:12

not sure if that works, to avoid bugs make it like

if get Global happiness 

Last seen on 03:32, 22. Jul 2024
Joined Oct 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
whoops if Get global…
Sun, 10/03/2021 - 22:12

whoops

if Get global:happiness for event target entity = 3

 do return true

 

return false

Last seen on 14:50, 29. Sep 2024
Joined Oct 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Here. It looks like it works…
Sun, 10/03/2021 - 22:50

Here. It looks like it works, however the warnings and errors say "Procedure that uses return value must end with a valid return block" should I use a variable that is always true or false?

 

Btw, thank you so much for your help!

Last seen on 14:50, 29. Sep 2024
Joined Oct 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Wait, nvm, I have fixed it,…
Sun, 10/03/2021 - 23:06

Wait, nvm, I have fixed it, I just had to move around the blocks

Last seen on 03:32, 22. Jul 2024
Joined Oct 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
:)
Sun, 10/03/2021 - 23:29

:)

Last seen on 14:50, 29. Sep 2024
Joined Oct 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Thank you a lot for helping…
Mon, 10/04/2021 - 11:15

Thank you a lot for helping me with my return procedures, however this still doesn't work in multiplayer, is there some way for me to make it so that in multiplayer a player can for example have there custom bar to 1/3, while the other player has it to 2/3 (or with more players more values). Is there some way for me to make it so that the bar status that represents that players happiness score, only appears for that player, so that player A's bar doesn't overlap with player B's bar so that both there values are all glitched and overlapping. Player A's value would show on there screen, while Player B's value would show on there screen, not overlapping. I know this is super wordy but I hope you get the gist. And if you could help me with this I would much appreciate it. Thank you!

Last seen on 03:32, 22. Jul 2024
Joined Oct 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
make the number variable…
Mon, 10/04/2021 - 15:59

make the number variable Player Persistent and not World