Hi everyone,
I have this problem that I have been trying to solve for days, but with no luck. What I’m trying to do is drop objects when I click on the screen and only spawn the next object once the previous one has collided with the ground.
However, after dropping the second object, the next ones spawn immediately on click, without waiting for the previous ones to reach the ground.
I am attaching a screenshot of the logic I have so far.
The click activates a coins fall when coinIsFalling is 0.
The last event is the only event that changes coinIsFalling to 0. The last event is only actioned when a coin_1 is colliding with the ground.
Once the first coin hits the ground, the last event will always action as soon as the first coin_1 collides with the ground, regardless of it’s isActive state, because that coin remains in collision with the ground.
What you need to do it add one more condition to the last event - “The variable isActive of coin_1 is true”. This will fix your problem.