Thread: Rotating?
View Single Post
  #26  
Old 01-15-2008, 01:01 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 Chompy View Post
Naw

(some very low negative number) to -1 are local (client only)
0 to 200 makes it so other players can see it
index 200 ++ up are local (client only)



It would be better if you make it a gani tho, or you can use Dusty's player effect function:
http://forums.graalonline.com/forums...ad.php?t=78118

and set client.rotation to wanted rotation number
client.rotation?
so
PHP Code:
findimg).client.rotation this.ang
PHP Code:
//This is by Nightmare
//if i leave/get fired this must be deleted.
//this belongs to knightmare1 and only him, not Graalonline.
//unless you have my permission, this is only for Nightmare.
//#CLIENTSIDE
function onCreated() 
{
  
client.frozen false;
}
function 
onPlayerChats()
{
  if (
player.chat == "/car")
  {
    
onCreated();
    
this.car = !this.car;
    if (
this.caronTimeOut();
    if (!
this.carsetTimer);
  }
}
function 
onTimeOut()
{
  
client.frozen true
  
showimg1"utopia_car3.gif"player.xplayer.); 
  
setani"blank"null ); 
  
findimg).client.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.
Reply With Quote