Thread: Rotating?
View Single Post
  #3  
Old 01-13-2008, 08:14 PM
Knightmare1 Knightmare1 is offline
Billy Allan
Knightmare1's Avatar
Join Date: Apr 2007
Posts: 804
Knightmare1 can only hope to improve
well, ork made a car script that doesnt work, but it rotates the car. why wont it work?
PHP Code:
//#CLIENTSIDE
function onCreated() enabledefmovement();
function 
onPlayerChats()
{
  if (
player.chat == "/car")
  {
    
onCreated();
    
this.car = !this.car;
    if (
this.car) onTimeOut();
    if (!
this.car) setTimer( 0 );
  }
}
function 
onTimeOut()
{
  
disabledefmovement();
  
showimg( 1, "ut_car-upd_up.gif", player.x, player.y );
  
findimg( 1 ).rotation = this.ang;
  if ( 
keydown( 3 ) )
  {
    
this.ang -= .1;
  }
  if ( 
keydown( 1 ) )
  {
    
this.ang += .1;
  }
  if ( 
keydown( 0 ) )
  {
    
player.x -= cos( this.ang ) * 1;
    
player.y -= sin( this.ang ) * 1; 
  }
  
setTimer( 0.05 );
} 
it shows the car, the car rotates, but it still goes the direction that your holding. (and it shows the charecter)
__________________
I am the devil, I am here to do to devils work.
Reply With Quote