Thread: Some angle help
View Single Post
  #21  
Old 11-03-2007, 11:16 PM
coreys coreys is offline
N-Pulse Assistant Manager
coreys's Avatar
Join Date: Mar 2005
Posts: 2,180
coreys has a spectacular aura about
Send a message via AIM to coreys Send a message via MSN to coreys Send a message via Yahoo to coreys
(Sorry for double posting)
I changed it to this:
PHP Code:
function onTimeOut() {
  if (
this.distgone this.dist) {
    
temp.this.x+1temp.this.y+1;
    if (!
onwall(temp.x+cos(this.angle)*this.velocitytemp.y))
      
this.+= cos(this.angle)*this.velocity;
    else
      
this.angle pi this.angle;
    if (!
onwall(temp.x,temp.y+(-sin(this.angle))*this.velocity))
      
this.+= -sin(this.angle)*this.velocity;
    else
      
this.angle = -this.angle;
    
this.distgone += this.velocity;
    
this.velocity = (this.velocity/7)*6;
    
setTimer(0.05);
  }

But the onwall checks are still off o.o
__________________

Quote:
*SlikRick: so should I even ask about your aim status?
*Xor: well if you want to
*Xor: but i am LARPING
*SlikRick: While on a computer?
*Xor: yes
*Xor: in my living room
*SlikRick: ahh
*Xor: i have a fort setup to hide from beasts
Reply With Quote