Started by
benl4b
on
Topic category: Help with Minecraft modding (Java Edition)
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
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
okay thank you. i will try it.