Thread: Rotating?
View Single Post
  #9  
Old 01-13-2008, 09:55 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 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 :]

Can you read... All I said was that "I FIXED IT UP A ABIT." There are no Fancy functions... I don't think.
Reply With Quote