So I have a moving block pushing across the screen and when the player doesn't collide with it I don't want the player to die anymore. So here what I got
Player on collision with player set variable 1
(X)player on collision with player set variable 0
Colliding with player = 1/ wait 3 sec/ destroy
Colliding with player =0/ No event
Develop games in your browser. Powerful, performant & highly capable.
In other words, the player only dies if it continues to collide with the object for 3 seconds? Yeah, you should not use "wait" here.
Try something like this:
On player collision with block -> Set collisionTime to time
Player NOT overlapping block -> Set collisionTime to 0
collisionTime not equal 0
collisionTime less than (time-3) -> Player destroy
You can also do the same with Timer behavior. On collision start a timer "die" for 3 seconds. If no longer overlapping, cancel timer. On "die" timer event, destroy the player.