Change tile?
Moderator: tr1p1ea
Change tile?
I'm trying to make a Sim City type game with xLib. How would I have the user select a tile on the map with a cursor and then when hey press enter they have a list of choices (buildings that they can build) and then change the tile to a different one depending on what they chose (build the selected building)
- dysfunction
- Calc Master
- Posts: 1454
- Joined: Wed 22 Dec, 2004 3:07 am
- Location: Through the Aura
Simply display the pic with your tiles in it, then have a cursor for the player to select the tile. Store the X and Y position of that sprite to variables, then when you go back to the map, draw the sprite in the position indicated by those variables.
"You're very clever, young man, but it's turtles all the way down!"
- Dragonwarrior333
- Regular Member
- Posts: 121
- Joined: Sat 19 Mar, 2005 1:59 pm