Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 11-09-2009, 05:57 PM
Liberated Liberated is offline
not doing alot
Liberated's Avatar
Join Date: Feb 2008
Posts: 1,366
Liberated has a spectacular aura about
flying

i made this flying/hovering script, but i need help with 1 thing.
I need to turn the blocking off all objects off, and i need to turn the walking sound off.
Is there any way to accomplish this? This is the script.
PHP Code:
//#CLIENTSIDE
function onKeyPressed(code,key)
{
  if( 
key == "m" )
  {    
    if(
player.== 10)
    { 
      
player.chat="max altitude reached!";
    }
    else 
    {
      
player.z+= 0.5;
      if(
player.0)
      {
      
replaceAni("walk""idle");
      }      
    }   
    }   
  else if( 
key == "n" )
  {
    if(
player.0)
    {
      
player.z-= 0.5;
      if(
player.== 0)
      {
        
replaceAni("walk""walk"); 
      }     
    }
  }

__________________
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
  #2  
Old 11-09-2009, 05:59 PM
Rufus Rufus is offline
Registered User
Join Date: Jun 2004
Location: United Kingdom
Posts: 4,698
Rufus has much to be proud ofRufus has much to be proud ofRufus has much to be proud ofRufus has much to be proud ofRufus has much to be proud ofRufus has much to be proud of
Quote:
Originally Posted by Liberated View Post
i need to turn the walking sound off.
Now I'm no scripter, but I assume you just need to use a different walk gani when flying, and remove the walk sound playing from the gani file.
__________________
Quote:
Originally Posted by Loriel View Post
Seriously, you have ****-all for content and you're not exactly pulling in new developer talent, angling for prestigious titles should be your last concern.
Reply With Quote
  #3  
Old 11-09-2009, 06:09 PM
Liberated Liberated is offline
not doing alot
Liberated's Avatar
Join Date: Feb 2008
Posts: 1,366
Liberated has a spectacular aura about
Quote:
Originally Posted by Rufus View Post
Now I'm no scripter, but I assume you just need to use a different walk gani when flying, and remove the walk sound playing from the gani file.
Im already using the idle gani, but i still hear the walking sound, i guess it's in the movement system.
__________________
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
  #4  
Old 11-09-2009, 06:15 PM
Rufus Rufus is offline
Registered User
Join Date: Jun 2004
Location: United Kingdom
Posts: 4,698
Rufus has much to be proud ofRufus has much to be proud ofRufus has much to be proud ofRufus has much to be proud ofRufus has much to be proud ofRufus has much to be proud of
Quote:
Originally Posted by Liberated View Post
Im already using the idle gani, but i still hear the walking sound, i guess it's in the movement system.
If it isn't showing the idle gani where it's supposed to show it then yeah, there is something affecting it and it could be the movement system if you're using something custom.
__________________
Quote:
Originally Posted by Loriel View Post
Seriously, you have ****-all for content and you're not exactly pulling in new developer talent, angling for prestigious titles should be your last concern.
Reply With Quote
  #5  
Old 11-09-2009, 06:16 PM
Liberated Liberated is offline
not doing alot
Liberated's Avatar
Join Date: Feb 2008
Posts: 1,366
Liberated has a spectacular aura about
Quote:
Originally Posted by Rufus View Post
If it isn't showing the idle gani where it's supposed to show it then yeah, there is something affecting it and it could be the movement system if you're using something custom.
yeah it's showing the idle gani when it's supposed to, but it also still plays the walking sound, so i think the walking sound is in the default movement system, and not the gani.
__________________
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
  #6  
Old 11-09-2009, 06:24 PM
Rufus Rufus is offline
Registered User
Join Date: Jun 2004
Location: United Kingdom
Posts: 4,698
Rufus has much to be proud ofRufus has much to be proud ofRufus has much to be proud ofRufus has much to be proud ofRufus has much to be proud ofRufus has much to be proud of
Quote:
Originally Posted by Liberated View Post
yeah it's showing the idle gani when it's supposed to, but it also still plays the walking sound, so i think the walking sound is in the default movement system, and not the gani.
Oh you're right, I just tested it. I'm out of my depth here, but this might help you.
__________________
Quote:
Originally Posted by Loriel View Post
Seriously, you have ****-all for content and you're not exactly pulling in new developer talent, angling for prestigious titles should be your last concern.
Reply With Quote
  #7  
Old 11-09-2009, 06:34 PM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
Disable default movement, and then use code that you would find in Staff Boots.
__________________
Quote:
Reply With Quote
  #8  
Old 11-09-2009, 06:54 PM
Liberated Liberated is offline
not doing alot
Liberated's Avatar
Join Date: Feb 2008
Posts: 1,366
Liberated has a spectacular aura about
Quote:
Originally Posted by Rufus View Post
Oh you're right, I just tested it. I'm out of my depth here, but this might help you.
Thanks, haven't tested it, but that should work, =]

Quote:
Originally Posted by fowlplay4 View Post
Disable default movement, and then use code that you would find in Staff Boots.
Thanks, i'l play with it a little, i already had a look into the staffboots on testbed, but didn't really see any concrete fix, so left it.
__________________
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
  #9  
Old 11-09-2009, 06:59 PM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
Quote:
Originally Posted by Rufus View Post
but this might help you.
Reply With Quote
  #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
  #11  
Old 11-09-2009, 08:14 PM
Soala Soala is offline
Ideas on Fire
Soala's Avatar
Join Date: Jun 2007
Location: In my head
Posts: 3,208
Soala is a jewel in the roughSoala is a jewel in the rough
Quote:
Originally Posted by Liberated View Post
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.

Like with the boots NPC on N-Pulse =O ? Would be fun
Keep going
Reply With Quote
  #12  
Old 11-10-2009, 11:21 AM
Liberated Liberated is offline
not doing alot
Liberated's Avatar
Join Date: Feb 2008
Posts: 1,366
Liberated has a spectacular aura about
i've got my jumpscript to were i like it.
For the jumping part that is, but i haven't been able to add it so that i can jump over/on things, i can't seem to get the thing used for nthe staffboots in there working. i understand how it works, but i can't get it right.
PHP Code:
//#CLIENTSIDE
function onKeyPressed(code,key)
{
  if( 
key == "f")
  {
    if(
player.0)
    {
      
replaceAni("walk""idle");
      
temp.0;
      while(
temp.4)
      {
        
temp.+= 0.5;
        
player.+= 0.2/temp.i;
        
sleep(0.05);
        if(
player.1)
        {
          
settimer(0.05);
        }
        else if(
temp.== 4)
        {
          
temp.0;
          while(
temp.4)
          {
            
temp.+= 0.5;
            if(
player.0.5)
            {
              
replaceAni("walk""walk");
              
player.0;
            }
            else
            {
              
player.-= 0.2*temp.i;
              
sleep(0.05);
            }
          }
        }
      }
    }  
  }

__________________
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
  #13  
Old 11-26-2009, 07:08 PM
Samposse Samposse is offline
Chopa Shopa !
Samposse's Avatar
Join Date: Nov 2008
Location: Norway
Posts: 87
Samposse is an unknown quantity at this point
Send a message via AIM to Samposse Send a message via MSN to Samposse
Fly !
__________________
Delitto :3

A
SERVER
UNDER
CONSTRUCTION !

feel free to ask me about delitto
Reply With Quote
  #14  
Old 11-26-2009, 07:27 PM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
Quote:
Originally Posted by Samposse View Post
Fly !
Really?
__________________
Quote:
Reply With Quote
Reply


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 03:43 PM.


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