Started by
arinayspenskaya
on
Topic category: Help with Minecraft modding (Java Edition)
How do I make a wallet with two currencies linked to the player who made it, which will receive a payout from the currency earnings block placed by the same player?
You can use player variables to store currency amounts.
See https://mcreator.net/wiki/variables
To show value, you can use commands, overlay, or GUI element
I also suggest you check our tutorials collection playlist on our YouTube channel which contains many examples and tutorials that can help you get started with MCreator: https://www.youtube.com/playlist?list=PLAeL-oIFIEngE6jRgFYeFMfuj8WQsO3Ei
How do I change the text to the value of a variable in the gui?
Use procedure that returns string to change label text
I'm having trouble with youtube, so it's easier for me to ask here, can you please show me an example? I'm quite new at this.
In this case
I can't figure out how to change the value in a variable by +1 every 20 seconds. I managed to make a timer, but changing the value itself is a bit difficult for me. I would be grateful for any help.
One option is to count every tick, meaning 1 second = 20 ticks.
Then when counter reaches 20 s * 20 = 400 ticks, increment your other variable by 1, or even work directly with 400 as 1, or divide variable by 400
I only find a change in the number of the variable, I can't find anything about changing the string variable. Is it possible to return a number variable in gui somehow, or how to change a number in a string?
Yes, number can be converted to text. See https://www.youtube.com/watch?v=3wriUZisw8U