turf/var
gtfs
tx
ty
tz
turf/proc
gettile(var/tileX,var/tileY,icon/tileset)
tileX *= 32
tileY *= 32
src.icon = tileset
pixel_y=tileY
pixel_x=tileX
turf/New()
if(src.gtfs == 1)
src.gettile(tx,ty,tz)
..()
turf/skelleton_sandtest
gtfs = 1 //is 1 to show it is getting from tileset
tx = 6 //the tile is 6 tiles to the right
ty = 1 //the tile is 1 tile down
tz = 'tileset.png' //the tileset name
mob/Login()
src.loc = locate(1,1,1)
world/turf = /turf/skelleton_sandtest
Problem description:
i am trying to make a lib that takes a specific tile from the set of tiles. For example, if i choose the tileset from
http://www.rmxpu.net/downloads/uploads/Ultimate_Tileset.png
(it is already in the folder), and i wanted to get the skeleton in sand facing east i would go
turf/skelleton_sandtest
gtfs = 1 //is 1 to show it is getting from tileset
tx = 6 //the tile is 6 tiles to the right
ty = 1 //the tile is 1 tile down
tz = 'tileset.png' //the tileset name
and it would make the turf's icon into
Shot at 2007-07-16
but instead it looks like this:
Shot at 2007-07-16
could anyone tell me if i am doing somthing wrong?
If so could you tell me how you would fix?
if this works, it will save many people the time of cutting up HUGE tilesets int 32*32 tiles
Lummox JR