View Single Post
  #15  
Old 01-06-2011, 01:41 AM
scriptless scriptless is offline
Banned
Join Date: Dec 2008
Location: N-Pulse
Posts: 1,412
scriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to behold
This doesnt seem to be choosing the random correctly..

PHP Code:
//#CLIENTSIDE
public function DrawLineindsxsytxtywidrgbalph ) { 
  
temp.ang getangle(tx sxty sy) + (pi/2); 
  
temp.wid = ( wid == NULL .1 wid ); 

  
with findImg(ind) ) { 
    
polygon = { 
      
sxsy
      
txty
      
tx cos(ang)*widty sin(ang)*wid
      
sx cos(ang)*widsy sin(ang)*wid 
    
}; 
    
red = ( || ); 
    
green = ( || ); 
    
blue = ( || ); 
    
alpha = ( alph <= || alph alph); 
    
layer 3
  } 
}  

function 
onMouseDown() {
    
this.angle random(this.angle-15,this.angle+15); // angle
    
this.distance random(5,7); // distance
    
this.nx sin(this.angle) * this.distance;
    
this.ny cos(this.angle) * this.distance;
    
DrawLine(2000this.nxthis.nyxy);

The angles are still wrong.. it's supose to pick a random angle within 15 degrees of current angle.. o_O but it's still 360 =/
Reply With Quote