
01-06-2011, 03:22 AM
|
|
the fake one
|
 |
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
|
|
Quote:
Originally Posted by scriptless
New problem, move() only works first time then stops.. any particular reason behind this?
PHP Code:
function onMouseDown() {
this.nx = x;
this.ny = y;
for ( i=0; i<3; i++ ) {
this.angle = random(this.angle-0.522,this.angle+0.522); // angle
this.distance = random(2,5); // distance
this.nx2 = this.nx + sin(this.angle) * this.distance;
this.ny2 = this.ny + cos(this.angle) * this.distance;
move(x, y, x+5, y+5);
DrawLine(2000+i, this.nx, this.ny, this.nx2, this.ny2);
this.nx += sin(this.angle) * this.distance;
this.ny += cos(this.angle) * this.distance;
}
}
|
You can't stack moves on top of eachother like that. Use the option that gives an event when finished (8? check scripthelp) and in the onMovementFinished (if I recall correctly) event call move again. |
|
|
|