Thread: Projectiles
View Single Post
  #5  
Old 12-13-2008, 06:15 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
When creating custom projectiles, I strongly recommend using move() rather than altering the x & y; it will be much easier on the server, also.

PHP Code:
function onCreated() {
  
onMovementFinished();
}
function 
onMovementFinished() {
  
temp.movex sin(this.angle) * SPEED_HERE;
  
temp.movey cos(this.angle) * SPEED_HERE;
  
move(movexmovey.18);

__________________
Reply With Quote