Change tile?

Moderator: tr1p1ea

Post Reply
sean77771
New Member
Posts: 5
Joined: Sat 11 Feb, 2006 9:07 pm

Change tile?

Post 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)
User avatar
dysfunction
Calc Master
Posts: 1454
Joined: Wed 22 Dec, 2004 3:07 am
Location: Through the Aura

Post 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.
Image


"You're very clever, young man, but it's turtles all the way down!"
User avatar
Dragonwarrior333
Regular Member
Posts: 121
Joined: Sat 19 Mar, 2005 1:59 pm

Post 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 )
User avatar
kalan_vod
Calc King
Posts: 2932
Joined: Sat 18 Dec, 2004 6:46 am
Contact:

Post 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
Post Reply