Way to "wait" in blocks? [RESOLVED]

Is there a way to add waits in blocks? I want to set up a fishing system, but I need a random wait when fishing. In order to do that, I need to randomize the waiting times through blocks, but there doesn’t seem to be a way to change that waiting time (or any wait blocks so I can broadcast the fishing channel)

Is it possible?

1 Like

[bump to get this seen]

Use a trigger and set it’s run delay to the amount of time. (in seconds)

1 Like

I think I know a way, but it would be hard, and you couldn’t do it just inside of blocks. You have a timer that is reset every second and is added to every 0.2 seconds or something. It starts at 1. Have the timer update a property called r. Place down a button and 5 checkers. The checkers will be checking if r is at 1, 2, 3, 4, or 5. Run the button into the checkers so that when the button is pressed, a check is run. Place down 5 wire repeaters. Run wires from the checkers into the wire repeaters so that when a check is successful, the repeater is activating. The delay on each wire repeater can be whatever number you want. Run those wire repeaters into a trigger that will run the final part of your code.

Hopefully this helped.

So, make a random number, say, between 1 and 4. If the number is 1, broadcast on fishWait1. If 2, broadcast on fishWait2.
Place 4 wire repeaters with a delay of 0.1, 0.2, 0.3, and 0.4. Then have each one receive fishWait1, 2, 3, and 4. Have each wire repeater then go to a trigger that fishes. I hope this helps!

1 Like

I’ll do this. Thanks @JoeTheChicken for the help though!

Bump because this is really useful

1 Like

Maybe you could have a trigger that triggers itself, using the delay option, and in the blocks, it would increment a property for the amount of times it ran, and if the property reaches a certain amount, it would stop and broadcast on another channel.

Have a trigger recurse and do a 1/4 chance to stop, with 0.1 delay.

You replied to this 4 months ago already-

Must have been unsatisfied with his answer

Wait I did?
Oh, well my old answer was more boring anyway.

1 Like

This topic was automatically closed 3 hours after the last reply. New replies are no longer allowed.