MaxCoderz

for your 1 bit pleasure!

All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Change tile?
PostPosted: Wed 22 Feb, 2006 1:42 pm 
Offline
New Member

Joined: Sat 11 Feb, 2006 9:07 pm
Posts: 5
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)


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed 22 Feb, 2006 2:39 pm 
Offline
Calc Master
User avatar

Joined: Wed 22 Dec, 2004 3:07 am
Posts: 1454
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.

_________________
Image


"You're very clever, young man, but it's turtles all the way down!"


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Mon 27 Feb, 2006 10:40 pm 
Offline
Regular Member
User avatar

Joined: Sat 19 Mar, 2005 1:59 pm
Posts: 121
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 )

_________________
Space Dodgers --- http://www.freewebs.com/dwarrior333
Image


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Mon 27 Feb, 2006 11:42 pm 
Offline
Calc King
User avatar

Joined: Sat 18 Dec, 2004 6:46 am
Posts: 2932
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


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB ® Forum Software © phpBB Group | DVGFX2 by: Matt