I originally wanted to find a way to control the x y coordinates of a sprite being added depending on the situation but that’s not working. My other idea is to add the sprite at the beginning. If I need the sprite to be added at different coordinates I add the sprite again further down in the code. It seems to correctly take the new coordinates but the tween (for the sprite) makes it disappear sooner than I want. Is there a way to check if a sprite (and/or tween) already exists before I add it?
This if(typeof spriteName === 'undefined'){...
doesn’t work too well.