Page 1 of 1

Change tile?

Posted: Wed 22 Feb, 2006 1:42 pm
by sean77771
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)

Posted: Wed 22 Feb, 2006 2:39 pm
by dysfunction
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.

Posted: Mon 27 Feb, 2006 10:40 pm
by Dragonwarrior333
I think this is what he means:

Image

Just have a "ptchange(" loop that inverts it or use the omnicalc sprite command to invert the selected sprite (which is MUCH faster :D )

Posted: Mon 27 Feb, 2006 11:42 pm
by kalan_vod
Why do you need to invert? It is fine the way it appears! And how dare you mention omnicalc! :D And btw xLIB can invert using Real(12