is there a way to make a procedure create a variable without my own action?

Started by spookykitty72 on

Topic category: Help with modding (Java Edition)

Last seen on 00:50, 30. Sep 2024
Joined Sep 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
is there a way to make a procedure create a variable without my own action?

Title says basically everything, I have a GUI that I want the players to be able to add buttons to. the idea is that they can select a mob and then press that button to summon it.,

the only way I've been able to get this to work (theoretically I haven't actually tried it yet) is to get a number variable for the total amount of buttons (Player presses the + button, it brings up a menu of mobs, then they can select the mob they want and it will create a new button that they can press to do so. i have to tell the game to show a new button) and then show buttons based on that. then have the text for each individual button be its own string variable (so ill have to make like 100 different string variables and tell the game to edit each of these.)

this sounds like something that would not only be super boring for me, but might be super pc intensive as well. if anyone has either a way for a procedure to make a global variable for itself or a much easier way to get this done, that would be super appreciated!

Last seen on 00:50, 30. Sep 2024
Joined Sep 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
To super clarify because i…
Mon, 09/30/2024 - 00:52

To super clarify because i realize that middle text sounds insane, its supposed to be a menu that players can summon mobs from with a button press. i need that first number variable to check how many summonable mobs the player has, and to tell those 2 blank buttons to show up, and the rest of the variables to change the name and data of whats in the buttons.