View Single Post
  #5  
Old 01-28-2010, 05:59 AM
12171217 12171217 is offline
Banned
Join Date: Jan 2009
Posts: 453
12171217 has a spectacular aura about
Quote:
Originally Posted by Clockwork View Post
Alright D: I has a problem. Trying to make the level a little more alive, I made an animation:



But, in graal, It clips in the middle frames like this:


anyone have any solution?
Turn it into a gani, or turn it into a strip of frames and use a script like:

PHP Code:
//#CLIENTSIDE
function onPlayerEnters() {
  
//The name of your file.
  
this.imagename "animated_strip.png";
  
//The horizontal length of each frame.
  
this.stripwidth 32;
  
//The vertical length of each frame.
  
this.stripheight 32;
  
//The number of frames.
  
this.maxframes 10;
  
//The amount of time to wait before repeating in seconds.
  
this.waitlength 2;
  
setTimer(.05);
}

function 
onTimeOut() {
  
setTimer(.05);
  if (
this.wait this.waitlength) {
    
this.frame 0;
    
this.wait += 0.05;
    return;
  }
  
setImgPart(this.imagenamethis.stripwidth*this.frame0this.stripwidththis.stripheight);
  
this.frame++;
  if (
this.frame this.maxframes) {
    
this.frame 0;
    
this.wait 0;
  } 

Dunno, should work.
Reply With Quote