I Want To Make A Score That Changes When You Click A Button And The Score Shows Up In A GUI

Started by Cool_Wesley_Dude on

Topic category: Help with MCreator software

Joined Oct 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I Want To Make A Score That Changes When You Click A Button And The Score Shows Up In A GUI

PLEASE HELP ITS HARD AND I WATCHED TUTORIALS, THEY DONT HELP!!!

Im trying to put the string in the math block D: it doesnt work.

Anyone know how to help?

Joined Oct 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
also how do you do the…
Wed, 01/17/2024 - 14:18

also how do you do the upgrade amount, do i do "Get Global: Clicks + Get Upgrade Amount"

Joined Oct 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
if so how do i do upgrade…
Wed, 01/17/2024 - 14:19

if so how do i do upgrade amount?

Joined Oct 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
and how do i set the Click…
Wed, 01/17/2024 - 14:20

and how do i set the Click score thing to "Clicks + 1" for testing

Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
  Here's an example of how…
Wed, 01/17/2024 - 14:25

 

Here's an example of how you would return the score, (if it's a player number variable), and how you would set the score using a player number variable.

If you instead want to use NBT data, the first function here will instead increase the score based on the NBT tag of an item in the GUI, and the second function will simply set the NBT tag of the item. (You would need to do this when the player first gets the item, otherwise the tag will default to zero.) 

Joined Oct 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
so if they are numbers not…
Wed, 01/17/2024 - 14:27

so if they are numbers not items...

Joined Oct 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
is it possible to make…
Wed, 01/17/2024 - 14:29

is it possible to make procedures and send them? xD

Joined Oct 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
how do i make the return…
Wed, 01/17/2024 - 14:34

how do i make the return text  create text with: blah blah longer

Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Yes- the problem you're…
Wed, 01/17/2024 - 14:37

Yes- the problem you're probably having is that you need a way to save the numbers so that you can refer to them later. Procedures normally just get rid of local variables when they're finished, so you either need to have a player persistent variable, or NBT data that will stay permanently. The 'Return Text' function, (and all the other return functions), allow you to send the result of a procedure to another procedure, GUI, entity, etc, which is useful for conditions, displaying variable information, or if you just want to make a separate procedure to do something for you that would be too clunky to include in the main procedure.

For strings of text, you can use a single text box, or use a 'create text with' function, which is useful if one or more items of the text are a variable. 

...Also, please try to just send one post with questions. I'm happy to help, but I get email notifications, and it's starting to clog up my inbox...

Joined Oct 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
sorry about me clogging it,…
Wed, 01/17/2024 - 14:51

sorry about me clogging it, but how do i make the create text with larger?

Joined Oct 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
nvm i found out how :D
Wed, 01/17/2024 - 14:52

nvm i found out how :D

Joined Oct 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
hey, umm my clicks go to the…
Wed, 01/17/2024 - 15:11

hey, umm my clicks go to the negatives when i buy too much... do you know how to stop that from happening?

Joined Oct 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
help, my clicks are in the…
Wed, 01/17/2024 - 15:29

help, my clicks are in the negative 2,000's  AAAAAAAHHHHHHHH

also i want to make a /click add (player) (number)

and /click remove (player) (number) 

just in case my clicks are in the negative 2,000's again so i dont have to click it 2,000 times xDDDD

Joined Oct 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
@Mindthemoons help pls it…
Wed, 01/17/2024 - 17:22

@Mindthemoons help pls it keeps going into the negatives when i buy something

Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
What are you using as the…
Wed, 01/17/2024 - 18:19

What are you using as the trigger? If you're doing it on entity update tick it might go down rapidly, or if you're accidentally multiplying instead of adding? It's really hard to tell without seeing your code. 

You should be able to pretty easily make a command that resets the counter. If it's a variable, just make a custom command, and link it to a procedure that sets the variable to zero for the target entity.