Have variables read out constantly [SOLVED]

Started by benl4b on

Topic category: Help with modding (Java Edition)

Last seen on 13:30, 18. Feb 2024
Joined Apr 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Have variables read out constantly [SOLVED]
Fri, 10/27/2023 - 13:02 (edited)

Hi, I've been trying to develop an explosive device with a remote detonator in Mcreator for a while now, but I have the problem that if I read a global variable all the time, my Minecraft crashes. (Kind of understandable... 😂) But you can always ask! 

How can you read a global variable all the time so that you can trigger something as soon as the variable changes? 

P.S. Don't be surprised, I used an "IfBlockRightClicked" procedure on the procedure to explode the block and used a Number variable to simplify things (for me). Effectively means that the block should detonate if the global variable is at "1". With "0" nothing should happen. 

 

Coding in the remote detonator item:


Coding in the explosive device block: (incorrect, but I'm already aware of that. Of course it doesn't work.)

 

Sorry if sometimes the translations are wrong or the pictures are a bit confusing (because of the language), but I'm from Germany and I had my description translated by a translator... ;)

Edited by benl4b on Fri, 10/27/2023 - 13:02
Last seen on 05:10, 3. Dec 2023
Joined Jun 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
The translator did a great…
Mon, 07/17/2023 - 22:05

The translator did a great job translating! I think your issue is the repeat for infinity. I would remove the repeater, and put this all under "block update tick" - https://imgur.com/oqzfOCn - and set the block so it ticks 20 times per second (Minecraft standard) - https://imgur.com/qBdF0X5

Last seen on 13:30, 18. Feb 2024
Joined Apr 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
okay thank you. i will try…
Wed, 07/19/2023 - 09:38

okay thank you. i will try it.