Thread: Whats wrong...
View Single Post
  #1  
Old 07-30-2001, 11:24 AM
Aknts Aknts is offline
Level Designer
Aknts's Avatar
Join Date: Apr 2001
Location: USofA
Posts: 3,340
Aknts will become famous soon enough
Send a message via AIM to Aknts
Whats wrong...

Whats wrong with this script the stars dont move?


if (created) {
this.stars=20;
this.s=1;
this.sfdef={26,56,20,2};
this.speed={1,1};
//
setarray this.star, this.stars*3;
for (this.s=0;this.s<this.stars;this.s++) {
this.star[this.s*3]=random(this.sfdef[0]*10,(this.sfdef[0]+
this.sfdef[2])*10)/10;
this.star[this.s*3+1]=random(this.sfdef[1]*10,(this.sfdef[1
]+this.sfdef[3])*10)/10;
this.star[this.s*3+2]=random(this.speed[0],this.speed[1])/1
0;
}
timeout = .05;
}
if (timeout) {
for (this.s=0;this.s<this.stars;this.s++) {
if (this.star[this.s*3+1]>this.sfdef[1]+this.sfdef[3]) {
this.star[this.s*3]=random(this.sfdef[0]*10,(this.sfdef[0
]+this.sfdef[2])*10)/10;
this.star[this.s*3+1]=random(this.sfdef[1]*10,(this.sfdef
[1]+this.sfdef[3])*10)/10;
this.star[this.s*3+2]=random(this.speed[0],this.speed[1])
/10;
}
else this.star[this.s*3+1]+=this.star[this.s*3+2];
showimg this.s,kstar.gif,this.star[this.s*3],this.star[this.s*3+1];
}
timeout = .1;
}
__________________
Reply With Quote