Author Topic: Cancel events that have a delay?  (Read 485 times)

Hey, anyone know how to cancel all events on a brick, even the ones with a delay? I've tried setEventTimeout and cancelEvents, but the delayed event still executes. I've also tried setEventEnabled.

You're supposed to use cancelEvents, and it especially cancels delayed events. The only way it would still be happening is if you are either trying to cancelEvents on bricks other than the one doing them, or you have it set where it reactivates anyway.

You're supposed to use cancelEvents, and it especially cancels delayed events. The only way it would still be happening is if you are either trying to cancelEvents on bricks other than the one doing them, or you have it set where it reactivates anyway.
It didn't work when I tried?

1000Delay>OnActivate>self>playSound>Alarm
300Delay>OnActivate>Self>Cancelevents

still played the sound.

Try putting the cancel before it...


Quote
X 0ms   onPlayerTouch   Self   cancelEvents
X 0ms   onPlayerTouch   Self   setColor   0.898039 0.000000 0.000000 1.000000
X 500ms   onPlayerTouch   Self   setColor   1.000000 1.000000 1.000000 1.000000

^ That's how I do it. It works right.