Graal Forums  

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

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

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 01:24 AM.


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