Help with timer please?

Started by LeaffeyPepol on Sat, 12/05/2020 - 02:43

Topic category: Help with modding (Java Edition)

Last seen on 18:42, 7. Dec 2020
Joined Nov 2020
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Help with timer please?
Sat, 12/05/2020 - 02:44 (edited)

So I'm working on making a fishing rod and have two problems:

1. I need the fishing rod to spawn my bobber-hook-thingy on the block that the player is looking at. (This is not my main question as I can probably find a forum topic that answers my question, honestly, I should just look up how to make a spawn egg.)

2. My main question, I need my bobber to wait a few seconds, then despawn/die. I already know how to make an item spawn after it dies, I really just need a timer.

Can someone please send me a screenshot of a procedure that has a timer?

Edited by LeaffeyPepol on Sat, 12/05/2020 - 02:44
Last seen on 03:20, 8. Jan 2021
Joined Dec 2020
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
create a global logic…
Sat, 12/05/2020 - 14:02

create a global logic variable aswell as a numeric one and have your procedure set it to true when you want your timer to start and create a new procedure that is set to "or when (globaltrigger) on world tick" and has an if statement checking if the variable is true and in the do section add "set (your global numeric variable), (your global numeric variable) + 1

in your procedure you're trying to use to see what the timer is at add if (your numeric var) = (what ever amount of ticks you want it to be delayed)

do

set (your numeric var) 0

set (your logic var) = false

Last seen on 18:04, 24. Jan 2021
Joined Apr 2010
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
I suggest you check our…
Sun, 12/06/2020 - 10:13

I suggest you check our tutorials collection playlist on our YouTube channel which contains many examples and tutorials that can help you get started with MCreator: https://www.youtube.com/playlist?list=PLAeL-oIFIEngE6jRgFYeFMfuj8WQsO3Ei