All my examples draw your head sprite facing down.
Using findimg, partx, party, partw, parth:
PHP Code:
//#CLIENTSIDE
function onCreated() {
with (findimg(200)) {
x = player.x;
y = player.y - 3;
image = player.head;
partx = 0;
party = 32 * 2;
partw = 32;
parth = 32;
// If you want to adjust it's zoom factor (play with this variable)
zoom = 1;
}
}
Using showimg and changeimgpart:
PHP Code:
//#CLIENTSIDE
function onCreated() {
showimg(200, player.head, player.x, player.y - 3);
changeimgpart(200, 0, 32* 2, 32, 32);
changeimgzoom(200, 1); // How to Change Zoom Factor
}
Using setimgpart for level npcs:
PHP Code:
//#CLIENTSIDE
function onCreated() {
setimgpart(player.head, 0, 32 * 2, 32, 32);
zoom = 1; // You can just change zoom directly here (GS2 only)
}