Thread: Rotating?
View Single Post
  #21  
Old 01-14-2008, 04:22 AM
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 napo_p2p View Post
For testing, I guess you could remove the weapon. When it goes to players though, you could just have the movement system stop working when a car is on.

That script is able to go over walls because you need to add some onwall detection :P. I think you have the skills to play around with onwall detection yourself. If you hit a snag, you know where to ask .
i got it to work!!! now i am gonna try to make it slow down... here is the script that works:
PHP Code:
//#CLIENTSIDE
function onCreated() enabledefmovement();
function 
onPlayerChats()
{
  if (
player.chat == "/car")
  {
    
onCreated();
    
this.car = !this.car;
    if (
this.caronTimeOut();
    if (!
this.carsetTimer);
  }
}
function 
onTimeOut()
{
  
disabledefmovement();
  
client.frozen true;
  
showimg1"utopia_car3.gif"player.xplayer.);
  
setani"blank"null );
  
findimg).rotation this.ang
    if ( 
keydown) )
  {
    
this.ang -= .1;
    
timeout;
  }
  if ( 
keydown) )
  {
    
this.ang += .1;
    
timeout;
  }
  if ( 
keydown0) )
  {
    
player.-= costhis.ang ) * 1.2;
    
player.+= sinthis.ang ) * 1.2
  }
  
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);
  }

__________________
I am the devil, I am here to do to devils work.

Last edited by Knightmare1; 01-14-2008 at 04:56 AM..
Reply With Quote