Is it because I have too many sprites with animations in my scene? There are 35 with all collectibles.
If created in the scene editor they should be in sync, but you can check that they are all set to the same animation frame by clicking on each instance and looking at the bottom of the properties window. You could also force them all to the same animation frame in the "At beginning of the scene" event.
If you are creating them with events, then ones created at different times will often be out of sync, because they will be created with frame 0, but existing instances may be on any of the other frames. You could enforce synchronisation by first checking that another coin exists (check number of objects >0) , then use the select random object event and capture its current animation frame in a variable. Then create a new coin and set its animation frame using the variable.
Alternatively, you could create the new coin first, then use a "for each object" sub-event to set all coins (new and old) to animation frame zero to match it.
Some of these will look more glitchy than others.
Oh, and I recognise that player character sprite.
MattLB wrote:Are you adding the coins in the scene editor, or creating them with events?In the editor, but now I have tried adding with action, the same result.
I found out that the problem only exists if the X position is higher than 5231. Mysterious!
Now I try your tips.
MattLB wrote:Oh, and I recognise that player character sprite.Yah is one of the best and famous freebies unfortunately no source files included
The problem is not the absolute X position but the distance from Player Start to the coins. An action that set the frame to 1 or change the animation, works only if it is very close to the coins. (also not 100% perfect, some have a frame offset) If I run a bit away and come back, the animations are messed up again.