Here is a picture of Botha for those of you who don't know:
And here is the "vacuum" script thaht Linkus made to add to the boss script:
CODE
import "std.zh"
ffc script vacuum{
void run(){
while(true){
int x = 128;
int y = 84;
float b; float p; float q;
int suckx = 1;
int sucky = 1; //suction pawer
//int r = n; //r is radius in pixels
this->X = x; this->Y = y;
p = Link->X - x;
q = Link->Y - y;
b = Tan(q / p); //checks angle between Link and FFC
//if(r <= (sqrt((p * p) + (q * q)))
//^distance formula to check if Link is in range.
//remove "//' at the beginning of lines 7, 11, and
//42 and replace "n" with length of radius.
if((b == 0) && (p > 0)){
Link->X -= suckx;
}
if((b > 0) && (b <= 90) && (p > 0) && (q > 0)){
Link->X -= suckx; Link->Y -= sucky;
}
if((b == 0) && (q > 0)){
Link->Y -= sucky;
}
if((b >= -90) && (b < 0) && (p < 0) && (q > 0)){
Link->X += suckx; Link->Y -= sucky;
}
if((b == 0) && (p < 0)){
Link->X += suckx;
}
if((b > 0) && (b <= 90) && (p < 0) && (q < 0)){
Link->X += suckx; Link->Y += sucky;
}
if((b == 0) && (q < 0)){
Link->Y += sucky;
}
if((b >= -90) && (b < 0) && (p > 0) && (q < 0)){
Link->X -= suckx; Link->Y += sucky;
}
//}
Waitframes(3); //controls suck rate
}
}
}
Edited by ZebraStallion, 03 April 2008 - 04:53 PM.