When I say block I meant not able to walk on. Do you wat us to define setimgpart?
GS2: setimgpart( "FileName", x, y, width, height);
GS1: setimgpart FileName, x, y, width, height;
Key:
Filename : Image your wanting to use.
x : where should the pixel start displaying horizontally, e.g. if it is set to 16
the image will be cut up and the first 16 pixels on the left will not show.
y: where should the pixel start displaying vertically, e.g. if it is set to 16
the image will be cut up and the first 16 pixels on the top will not show.
width : How wide should the image be displayed from the x.
height : How tall should the image be displayed from the y.
Example:
The default image is 32 px by 32 px
GS2:
PHP Code:
//#CLIENTSIDE
function onCreated() {
setimgpart( "block.png", 16, 16, 16, 16);
}
GS1:
PHP Code:
//#CLIENTSIDE
if (created) {
setimgpart block.png, 16, 16, 16, 16;
}
This will only show the lower right part of the block.
._ ._
|_|_|
|_|_| <- this lower right box will only be shown.