AMOS TOME Series IV Manual  Index Prev Page Next Page 58

Tile Tag Set tile,n
The tile tag system is a very simple way of monitoring the map for occurrences of particular tiles. Useful for things such as enemy generators (like in Gauntlet), alarms and so on. Basically, Tile Tag allows you to warn TOME to watch out for up to 8 tiles, If these tiles are plotted on the screen with Map Do/Left/Right/Top/Bottom , Map Update or Map Handle, then the Tile Tag variable will have a bit set for the relevant tile, and its coordinates will be put into the =Tile Tag X and Y variable for that tile.

The Tile Tag Set command is very simple, you do Tile Tag Set tile,t which makes TOME remember that tile as tag number t and whenever that tile is plotted bit t-1 (0-7) will be set in the Tile Tag variable. The Tile tag number can be in the range of 1-8 and the tile number can be in the range of 0-255 (0 switches off that particular tag. Obviously, this means that you cannot use tile number 0 with this system.

=Tile Tag
This returns a bitmap of the 8 tile tags and clears itself. This bitmap represents all 8 tags by 1 bit each and is used to check whether any tag or tags occurred in the last frame. e.g.

Tile Tag Set 4,1 : Rem watch out for Tile 4 as tag 1
Map Handle 1,mx,my etc
TT=Tile Tag
If TT
   If TT and 1
      Rem Tile 4 was plotted this frame !!!
   Endif
Endif

Obviously, this system is quite handy !

=Tile Tag X(n)
Returns the X co-ordinate that the tile tagged with tag number n was last spotted at.