View Single Post
  #22  
Old 09-03-2001, 05:21 AM
LiquidIce00 LiquidIce00 is offline
RadioActive Monkeeh
LiquidIce00's Avatar
Join Date: Apr 2001
Location: dirty south
Posts: 2,112
LiquidIce00 is on a distinguished road
Send a message via ICQ to LiquidIce00 Send a message via AIM to LiquidIce00 Send a message via Yahoo to LiquidIce00
Quote:
Originally posted by Tyhm
If memory serves, all the nonlinear motion scripts he had came from me anyway, particularly the bird...

The trick is to modify this.xspeed and this.yspeed instead of x and y directly. So
if(dir=0) this.yspeed-=random(0.5,1); //try to go up - if you're going down, slow down some
//etc
while(abs(this.yspeed)>1) this.yspeed*=0.9; //maximum speed=1 tile per call
//etc
this.testy=y+this.yspeed;
//all the usual onwall: if it hits the wall, this.testy=y; this.testx=x;
y=this.testy;

You can get it from there easy. If you can't, give up, you're scripting out of your league.
well .. my idea for nonlinear was more of a real curve instead of just moving diagonally randomly..
if thats what u ment ;\
__________________
LiquidIce *Owner* (UnholyNation)
-UN Website
http://www.unholynation.com
-UN Forum
http://forums.unholynation.com
-
-the thinker
-

-
onwall2 for nonp2p (i suck at onwall)
Reply With Quote