Thread: Tile Checking
View Single Post
  #7  
Old 07-22-2008, 05:20 AM
Loriel Loriel is offline
Somewhat rusty
Loriel's Avatar
Join Date: Mar 2001
Posts: 5,059
Loriel is a name known to allLoriel is a name known to allLoriel is a name known to allLoriel is a name known to all
Quote:
Originally Posted by Switch View Post
PHP Code:
0x31,0x1A4 
Those are hexadecimal numbers. That is just fancy syntax for regular numbers. The "0x" just means that the number is given in base 16, not base 10 as numbers usually are. You can look up the details on the internet, but as you are not going to do math with them manually, you do not really have to care because you can stuff them into variables or whatever and use them like regular numbers.

You use tiles[x, y] to check the number (as above) of the tile at x, y in the current level. You can compare it against the number of your water tile or whatever.

Checking whether a given tile is present in the current level is not going to get any easier than for-loops to check every tile on its own. Just put it into a function.

It might be easier to just flag all levels that are supposed to yield shells by putting an NPC that does something like level.canDigForShells = true, or however that works.
Reply With Quote