Procedure Calling Madness!

Started by ThomasF on

Topic category: Help with MCreator software

Joined Jun 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Procedure Calling Madness!

I'm working on updating my Betting Machine mod, and I'm trying to add a short delay to simulate the machine rolling.

On right click, I set a number NBT tag called "rollTime" to the value of 4.
Then, in UpdateTick, it detects that rollTime has changed, and every second, removes one from rollTIme, effectively becoming a 4 second timer.

The issue comes back up when in onRightClick, I attempt to have it detect that rollTime is back at 0, and calculate the prize winnings.
it doesn't do that, the procedure already finished, it set rollTime to 4, then didnt detect it at 0, and finished running.

I am completely and utterly confused on how I would get onRightClick to pick back up when UpdateTick finishes resetting rollTime.
I tried re-calling onRightClick at the end of UpdateTick, but I get compile errors.

Here's my current code : https://imgur.com/a/MdorQen
Please help!

Joined Jun 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Try changing the ≠ to <. It…
Wed, 06/24/2020 - 15:53

Try changing the ≠ to <. It might be that it somehow get negative.