Is there a way to detect if a value stays the same for a certain amount of time?

I’m trying to end the game when a counter value stays at 0 for at least 1 second. Is there a way to do this?

repeaters with a delay of one second.

Also If the value changes before 1 second passes, the game shouldn’t end.

make the counter update a property.
now place a repeater that triggers a task.
in the blockcode make it

if get property “property”
= 0
 do broadcast message on channel “endgame”

If this works, don’t forget to mark a solution!

1 Like

You can probably link the counter to a property, then use a repeater paired with a checker to check if the counter’s property is 0. If it is, increment a different counter, if it isn’t, reset said counter. Set that counter’s target to two, and when it reaches said target, end the game.

1 Like

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