View Single Post
  #8  
Old 08-10-2006, 04:36 PM
contiga contiga is offline
Graal2001 Administration
contiga's Avatar
Join Date: Jul 2004
Location: Netherlands
Posts: 419
contiga is an unknown quantity at this point
Send a message via ICQ to contiga Send a message via AIM to contiga Send a message via MSN to contiga Send a message via Yahoo to contiga
Well, I don't know how to explain it, but I know how to use it I used it in my fireball script for example;

PHP Code:
function onCreated() {
  
showCharacter();
  
setCharAni( this.info[ 0], "");
  
this.r_target = findPlayer( this.info[ 1]);
  
this.r_moves = 0;
  
moveIt();
}

function 
onMovementFinished() {
  if ( 
this.r_moves = 20) 
    
destroy();
  if ( 
this.x in | this.r_target.x - 2.5, this.r_target.x + 2.5| && this.y in | this.r_target.y - 2.5, this.r_target.y + 2.5|) {
    
triggerAction( this.r_target.x + 0.5, this.r_target.y + 0.5, "projectile", this.info[ 2]);
    
destroy();
  }
  else
    
moveIt();
}

function 
moveIt(){
  
this.r_angle = getangle( this.r_target.x - this.x, this.r_target.y - this.y);
  
move( cos( this.r_angle) * 5.5, - sin( this.r_angle) * 5.5, .4, 8);
  
this.r_moves ++;
} 
It has to do with angles and stuff.. like sinus and tan also do.
__________________
AIM: Contiga122
MSN: [email protected]
Status:
Quote:
Originally Posted by unixmad View Post
I am also awake 3AM to help correct problems.
Quote:
Originally Posted by Bomy Island RC people
Daniel: HoudiniMan is a bad guy =p
*Bell: rofl. I first read that as houdini is a bad man. like the little kid that wants his mommy to keep her away from that boogie man
Daniel: xD
*Rufus: I wouldn't want my kids around him.
Reply With Quote