Print a variable into chat?

Started by The Real F_rex on Wed, 03/24/2021 - 18:06

Topic category: Help with MCreator software

Last seen on 15:27, 6. Apr 2021
Joined Oct 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Print a variable into chat?
Wed, 03/24/2021 - 18:06

Hello internet,

I'm working with a variable set to Random (0,1) * 4 + 1 and I'm trying to figure out how to make this variable display in chat. Any and all help is appreciated!

Last seen on 00:56, 12. Apr 2021
Joined Mar 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Ok, so you need your…
Wed, 03/24/2021 - 22:24

Ok, so you need your variable of course, make sure its a number, and find the set variable block. (Make sure this is a local variable). So in custom variables drag Set Local: (variable name) to: And put a purple plus block in, that's in math. Put random 0,1 in one side and in the other do another plus block and do 4 in one and 1 in the other. Then simply put a "Send to chat to all players", then a "create text with" (Click the flower on the block and drag an item out so it only has one connecter), then put a Get Local: (variable name). Hope this fixes your problem! ;) Ps. If it's not working this is for a procedure in the java forge mod maker, and make sure the variable is a local variable you added yourself, make sure the set local is purple along with the get local. I haven't tested but hopefully it works ;) Tell me if it doesn't.

Last seen on 15:27, 6. Apr 2021
Joined Oct 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
It worked! Thank you so much!
Thu, 03/25/2021 - 18:02

It worked! Thank you so much!