Thread: imgpart help :(
View Single Post
  #10  
Old 04-05-2007, 01:03 PM
Angel_Light Angel_Light is offline
Varia Developer
Angel_Light's Avatar
Join Date: Nov 2005
Location: Knoxville, TN
Posts: 1,684
Angel_Light is on a distinguished road
Send a message via AIM to Angel_Light Send a message via MSN to Angel_Light
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"16161616);

GS1:
PHP Code:
 //#CLIENTSIDE
if (created) {
  
setimgpart block.png16161616;

This will only show the lower right part of the block.
._ ._
|_|_|
|_|_| <- this lower right box will only be shown.
__________________
Deep into the Darkness peering...
Reply With Quote