Number that goes up when i click a block displayed on overlay

Started by MaxIfHeWasinMi… on

Topic category: Help with modding (Java Edition)

Last seen on 18:03, 23. Aug 2024
Joined Feb 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Number that goes up when i click a block displayed on overlay

I'm making a tool that just makes counting easier in-game, so I have an overlay that has the number I want displayed, and when clicked on bock it will raise by 1, then when id click a block in the game it would jump straight to 123412361234(repeating) how would i just have that number go up by a single unit? anything helps

i had deleted the code as i had this issue a few days ago and wanted to put it off, so i just remade the code from memory so sorry if its incomplete im just throwing it together

for the display condition its" return text (get global variable)" and for when right clicked on block its "set (global variable) to: format number (1) as (get global variable)" if anything is wrong with that let me know

 

 

Last seen on 00:39, 29. Jul 2024
Joined Jul 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
for the right click on block…
Fri, 07/19/2024 - 00:02

for the right click on block trigger, try "set (global var) to [get(global var) + 1]"

Last seen on 18:03, 23. Aug 2024
Joined Feb 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
thanks! works good now, just…
Fri, 07/19/2024 - 21:17

thanks! works good now, just had to change the string variable to number, and when i did the +1 it would set to +2 in-game, so i just made it +0.5 so that works great now.

Last seen on 00:39, 29. Jul 2024
Joined Jul 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Nice, glad I could help
Fri, 07/19/2024 - 23:54

Nice, glad I could help