Thread: flying
View Single Post
  #10  
Old 11-09-2009, 08:10 PM
Liberated Liberated is offline
not doing alot
Liberated's Avatar
Join Date: Feb 2008
Posts: 1,366
Liberated has a spectacular aura about
so far its working, i've managed to use the thing found in staffboots, and apply it to my flying system,
and i've managed to replace the ganis with my own, so i don't hear the grass anymore, but 1 problem, i've uploaded my ganis, and the images needed for them to testbed, but nothing appears, im completely invisble.
PHP Code:
//#CLIENTSIDE
function onKeyPressed(code,key)
{
  if( 
key == "m" )
  {    
    if(
player.>= 10)
    { 
      
player.chat="max altitude reached!";
    }
    else 
    {
      
settimer(0.1);
      
player.z+= 0.2;
    }   
  }   
  else if( 
key == "n" )
  {
    if(
player.0)
    {
      
player.z-= 0.2;
    }
  }
}
function 
onTimeOut()
{
   if(
player.0)
  {
    
replaceAni("walk""myidle");
    
replaceAni("idle""myidle");
    
this.speed 0.1;
    
player.z-= 0.005;
     for ( 
temp.04++ )
      { 
      if ( 
keydown(i) )
      { 
// if the key for that direction is pressed
        
player.+= vecx(i) * this.speed;
        
player.+= vecy(i) * this.speed;
      }
     
settimer(0.05);
     }   
  }
  else
  {
   
    
replaceAni("idle""idle");
    
replaceAni("walk""walk");
    
settimer(0);
  }

oh, i've also made a jumpscript!
PHP Code:
//#CLIENTSIDE
function onKeyPressed(code,key)
{
  if( 
key == "f")
  {
   
    if(
player.)
    {
      
replaceAni("walk""idle");
      
temp.0;
      while(
temp.<= 3)
      {
        
settimer(0.05);
        
temp.++;
        
player.+= (1/temp.i);
        
sleep(0.03);
        if(
temp.== 3)
        {
          
replaceAni("walk""walk");
          
temp.0;
          while(
temp.<= 3)
          {
            if(
player.1)
             {
               
player.0;
             }
             else
             {  
               
temp.++;
               
player.-= (0.2*temp.i);
               
sleep(0.03);  
             }
           }  
        }  
      }
    }
  }

i'm still trying to make it that you can actually jump over stuff with this one tho, haven't gotten that to work yet.
__________________
Quote:
Originally Posted by Tigairius View Post
I promise when I get rich I'll send you an iPhone. I'll send everyone an iPhone.
Reply With Quote