View Single Post
  #5  
Old 02-25-2007, 12:26 AM
JkWhoSaysNi JkWhoSaysNi is offline
Ruler of the graalaxy
Join Date: Feb 2005
Location: Great Britain
Posts: 488
JkWhoSaysNi is on a distinguished road
Send a message via ICQ to JkWhoSaysNi
I'm displaying anis that get sequentially further from the player.. I just don't want them all to appear at once, i want them to be visibly appearing one at a time.


Heres the timeout part. I just want the images to visibly show one at a time.

PHP Code:
function onTimeout() {
 if (
keydown(6)) {
 for(
i=0;i<=20;i++) {
 if (
== 20this.extended true;
 if (!
this.extended && (== 0)) {
//Here is where I want the sleep();
    
}


fx = (player.x+2+vecx(player.dir)*i*0.7)-3;
fy = (player.y+1+vecy(player.dir)*i*0.7)-2;


hideimg(i+150);
showani(i+150,fx,fy,0,"fire_scalable",((i*0.05)*random(0.9,1.1)));

if(
== 19) {
        
triggeraction(0,0,"serverside","flamethrower",fx,fy);

     
//    hitobjects(1,fx,fy);
        
}
    
this.lastfx fx;
    
this.lastfy fy;
}


}
else {
  
this.extended false;
  for(
i=1;i<=20;i++) {
    
hideimg(150+i);
  }
}

setTimer(0.05);


__________________

Coming soon (Hopefully:P)
Reply With Quote