Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #8  
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
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 05:43 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.