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 01-13-2008, 09:42 PM
Knightmare1 Knightmare1 is offline
Billy Allan
Knightmare1's Avatar
Join Date: Apr 2007
Posts: 804
Knightmare1 can only hope to improve
Quote:
Originally Posted by Jeffyy View Post
PHP Code:
//#CLIENTSIDE
function onCreated() enabledefmovement();
function 
onPlayerChats()
{
  if (
player.chat == "/car")
  {
    
onCreated();
    
this.car = !this.car;
    if (
this.caronTimeOut();
    if (!
this.carsetTimer.5 );
  }
}
function 
onTimeOut()
{
  
disabledefmovement();
  
showimg1"<image name>"player.xplayer.);
  
findimg).rotation this.ang
    if ( 
keydown) )
  {
    
this.ang -= .1;
    
timeout;
  }
  if ( 
keydown) )
  {
    
this.ang += .1;
    
timeout;
  }
  if ( 
keydown0) )
  {
    
player.-= costhis.ang ) * 1;
    
player.+= sinthis.ang ) * 1
  }
  
setTimer0.05 );

  
temp.newx player.+ (this.graalspeed cos(this.angle));
  
temp.newy player.+ (this.graalspeed * -sin(this.angle));

function 
Accelerate()
{
  
this.smod 0;
  
this.speed += (this.speed this.maxspeed) ? .20 1;


function 
LeftTurn()
{
  
this.angle += degtorad(this.turnpower);
  
timeout;
    
  if (
radtodeg(this.angle)+this.turnpower <= 0)
  {
    
this.angle degtorad(360);
  } 
  
    if (
radtodeg(this.angle)+this.turnpower >= 360)
  {
    
this.angle degtorad(0);
  }
  
}

function 
RightTurn()
{
  
this.angle -= degtorad(this.turnpower);
  
  if (
radtodeg(this.angle)+this.turnpower >= 360)
  {
    
this.angle degtorad(359);
  } 
  
  if (
radtodeg(this.angle)+this.turnpower <= 0)
  {
    
this.angle degtorad(360);
  }
  } 
Fixed it up and tried it, Works great. Have fun :]
it still doesnt work for me. i can make it go, but it still shows me walking in the direction and it is slow unless your going the up direction.
__________________
I am the devil, I am here to do to devils work.

Last edited by Knightmare1; 01-13-2008 at 10:02 PM..
Reply With Quote
  #2  
Old 01-13-2008, 09:44 PM
Jeffyy Jeffyy is offline
Graphics Artist
Jeffyy's Avatar
Join Date: Dec 2007
Location: USA, NJ
Posts: 82
Jeffyy is an unknown quantity at this point
Quote:
Originally Posted by Knightmare1 View Post
it still doesnt work for me.
Did you add the image?
Reply With Quote
  #3  
Old 01-13-2008, 09:47 PM
Chompy Chompy is offline
¯\(º_o)/¯
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
Quote:
Originally Posted by Jeffyy View Post
Did you add the image?
Seriously, all you did was copy and pasting Rapid's functions into the post..

If it worked for you, I'll bet if you remove that you pasted it will work, since you didn't edit the original script to use those functions..
__________________
Reply With Quote
  #4  
Old 01-13-2008, 09:50 PM
Jeffyy Jeffyy is offline
Graphics Artist
Jeffyy's Avatar
Join Date: Dec 2007
Location: USA, NJ
Posts: 82
Jeffyy is an unknown quantity at this point
Ya... I did that and changed the buttons so up is go instead of left. I said i fixed it up, I didn't say I made it...
Reply With Quote
  #5  
Old 01-13-2008, 09:51 PM
Chompy Chompy is offline
¯\(º_o)/¯
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
Quote:
Originally Posted by Jeffyy View Post
Ya... I did that and changed the buttons so up is go instead of left. I said i fixed it up, I didn't say I made it...
All he needed was to change a little minus to a plus, not some fancy functions ;o
__________________
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:10 PM.


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