View Single Post
  #16  
Old 08-20-2008, 08:04 AM
Tigairius Tigairius is offline
The Cat
Tigairius's Avatar
Join Date: Jan 2007
Location: Missouri, USA
Posts: 4,240
Tigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant future
Quote:
Originally Posted by TheStan View Post
I'd have to tell you on AIM because I'm not allowed to put it out there like that.
I've made a function that flips images, but I'd rather have on built in.. It's also pretty inefficient and stuff.

Rescripted it in about 10 minutes... woohoo for highly inefficient & laggy workaround scripts!
PHP Code:
// NPC made by Tig
//#CLIENTSIDE
function onCreated() {
  
this.image = "door.png";
  
flipHorizontal();
}

function 
flipHorizontal() {
  
this.i = null;
  for (
temp.w = 0; temp.w < getimgwidth(this.image); temp.w ++) {
    for (
temp.h = 0; temp.h < getimgheight(this.image); temp.h ++) {
      
showimg(200 + this.i, this.image, x - (w * 1/16), y + (h * 1/16));
      
changeimgvis(200 + this.i, 3);
      
changeimgpart(200 + this.i, w, h, 1, 1);
      
this.i ++;
    }
  }
  
hide();
}

function 
flipVerticle() {
  
this.i = null;
  for (
temp.w = 0; temp.w < getimgwidth(this.image); temp.w ++) {
    for (
temp.h = 0; temp.h < getimgheight(this.image); temp.h ++) {
      
showimg(200 + this.i, this.image, x + (w * 1/16), y - (h * 1/16));
      
changeimgvis(200 + this.i, 3);
      
changeimgpart(200 + this.i, w, h, 1, 1);
      
this.i ++;
    }
  }
  
hide();
}

function 
flipBoth() {
  
this.i = null;
  for (
temp.w = 0; temp.w < getimgwidth(this.image); temp.w ++) {
    for (
temp.h = 0; temp.h < getimgheight(this.image); temp.h ++) {
      
showimg(200 + this.i, this.image, x - (w * 1/16), y - (h * 1/16));
      
changeimgvis(200 + this.i, 3);
      
changeimgpart(200 + this.i, w, h, 1, 1);
      
this.i ++;
    }
  }
  
hide();
} 
__________________


“Shoot for the moon. Even if you miss, you'll land among the stars.”

Last edited by Tigairius; 08-20-2008 at 08:28 AM..
Reply With Quote