Thread: setimgpart
View Single Post
  #19  
Old 07-22-2001, 05:51 PM
grim_squeaker_x grim_squeaker_x is offline
Retired Oldbie
grim_squeaker_x's Avatar
Join Date: Mar 2001
Posts: 3,084
grim_squeaker_x will become famous soon enough
Quote:
Originally posted by Cybnext_Design
Here is how you would show the 4 directions of a bomy:

NPC Code:

setgif bomy_chamo3.gif;
if (playerdir==0) {
setgifpart 0,0,48,48;
}
if (playerdir==1) {
setgifpart 48,0,48,48;
}
if (playerdir==2) {
setgifpart 96,0,48,48;
}
if (playerdir==3) {
setgifpart 144,0,48,48;
}

Hi, using the following script would be better:
NPC Code:
setimg bomy_chamo3.png; //Yes it's PNG
setimgpart bomy_chamo3.png,dir*48,this.sprite*48,48,48;


And then you'd need to script the proper sprites for it to use.
__________________

Reply With Quote