I have a draggable object (my player) who’s sprite I need to remove and replace with a different sprite for a game-over/death animation. To do this, when the collision function happens(the one that “kills” the player) I remove the player sprite (using the removeSelf command), and tell the player-dead sprite to play. The only problem is, when the removeSelf command activates, my object’s x and y coordinates become nil, and this creates an error with the conditional statements in my code that require a value for these coordinates (the one’s that keep the player from going off-screen, ie. if player.x < 25 then player.x = 25). Any solutions? I’m not a coder, so I’m thinking I could be using wrong approach as well.
Thank you,
Steven [import]uid: 79394 topic_id: 14749 reply_id: 314749[/import]