I have a problem with my game:
When the player passes a companion red sprite object is created, and when it collides with the blue object destroys it.
But the problem is that sometimes collided with the blue object and not destroys and the other thing is that when you destroy leaves a space between the red sprite companion
Then also lurks beneath the player, I would like it to be outside
https://www.dropbox.com/s/jctgf0sr7h87f ... 0test.capx
Develop games in your browser. Powerful, performant & highly capable.
Here you go, I've edited your example and this should work for you.
You had a small memory leak in there by continually increasing the size of the player position array. I have also changed the way the data is inserted into the array so that each tail sprite obtains its position data from the position array according to its position number and a time delay that you can edit using a local variable.
Thank you very much, is what I wanted