Hi! I recently solved a problem through this forum and so I’m back with a new one.
(disclaimer: I refer to the event of my character colliding with the object as “eating”)
As mentioned in my previous question, I’m making a flappy bird remake. I want the character to collect “apples” as a variable for a score, with a sound effect.
I spawn the pipes (“walls”) randomly through an external layout along with the apple in the middle like this:
However, when I try the game out, the apple sometimes is eaten twice (points go up by 2, sound effect also plays twice, but the apple just disappears once the first time).
I’ve tried to use a scene timer to increase the scores instead of a colliding event but it’s a little off the timing with the apple-eating.
Also, I made the character rotate on every jump using the FaceForward extension, so it might be because the character gets in touch with the apple twice within the “trigger once”, but I’m not sure how to fix it.
Please help me - I’m not sure if it’s the character colliding with the apple twice or if it’s just a code error.
This is my code: