I'm developing a little game at school together with a small group. I'm responsible for graphics but because of deadlines I'll also have to help coding a little now. I'm a total beginner and what I need to do right now for our 2D platform game is to make an image (.png) appear when the player stands at a specific location. I have managed to get images to be shown in-game (with lots of help) but I really have no idea how this should be done.
This is the code to display an image that we've used. Our game is called mimic and here I've placed a sign in the world. I want the text to appear when the player stands at the sign:
Just see if the player (x,y) position is within a certain range of the position you want. If it is then display the image else don't display the image. I'd suggest making the range a constant across the app so you can increase or decrease it as required.