This is some code I made that’s supposed to count down every time it receives a pulse from a wire repeater clock.
The top “if get property ‘toggled?’ = 0” is a latch that will prevent it from resetting to 10 seconds each time it gets a pulse.
The “if ‘text’ ≠ 0” just makes sure the counter doesn’t go below zero.
The bottom Broadcast Message On Channel just sends a message to the repeater clock saying that everything’s working.
Timer is a property so it can be set to whatever I want in a later part of my game.
The only issue is it won’t actually count down. Either it will stop at 9 or it will head straight for the value I’m decreasing it by (for example, if I put “change ‘Text’ by -1”, then it will immediately set it to -1). If anyone knows how to fix this, please let me know.