How would I run a procedure once?

Started by ThatSlimeDood on

Topic category: Help with modding (Java Edition)

Last seen on 18:53, 5. Oct 2022
Joined Nov 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How would I run a procedure once?

Say I wanted to say something in the chat when a block has a redstone charge, and I wanted it to run once until the redstone is turned off and on again.  How would I do that?

Last seen on 21:12, 25. Jul 2022
Joined Jul 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
This should work: In the…
Sat, 08/08/2020 - 01:41

This should work:

In the block's tick event,

IF block not charged,

DO set variable/NBT = 0

IF block is charged, AND variable/NBT is > 0,

DO "whatever you want it to do", and set NBT = 1

Last seen on 18:53, 5. Oct 2022
Joined Nov 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Thanks!
Sat, 08/08/2020 - 06:44

Thanks!

Last seen on 21:12, 25. Jul 2022
Joined Jul 2020
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You're welcome!
Sat, 08/08/2020 - 23:31

You're welcome!

Last seen on 21:16, 26. Apr 2024
Joined Jul 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
i couldnt understand it…
Fri, 04/26/2024 - 16:15

i couldnt understand it please show it by a photo