ID:157675
 
How would I go about using overlays and pixel offsets to make a 32 by 32 sword icon appear on a part of a 32*32 mob. An example may help, and thank-you!
sword.pixel_x = something
sword.pixel_y = something
something.overlays += sword
var/const
PLAYER_LAYER = FLOAT_LAYER-3
ARMOUR_LAYER = FLOAT_LAYER-2 //Above PLAYER_LAYER
WEAPON_LAYER = FLOAT_LAYER-1 //Above ARMOUR_LAYER
mob/overlay
player
layer = PLAYER_LAYER
icon = 'player.dmi'
armour
layer = ARMOUR_LAYER
weapons
layer = WEAPON_LAYER
sword
icon = 'sword.dmi'
verb/Equip()
usr.overlays += /mob/overlay/weapons/sword //makes the usr hold the sword