ok so basically,
while(Abs(this->X - x) > 4) || Abs(this->Y-y) > 4){(this->X=x)&&(this->Y=y)
}
is bad because it is out of order and also more complex than it needs to be.
No!
It's bad because you are using punctuation that should go in the if requirements to try and use functions!
Go back and read the syntax thing again.
so i need to take out the ()'s because they arent grouping functions together and that would cause an error.
They would, as well as the fact that:
Your functions do not end in a semi colon.
All functions must end in semi colonsthis->X = x
Is bad
this->X = x;
Is good.
then they need to be seperated which would do the same thing as the &&.
No it would
not do the same thing as &&.
In the if requirements, that means 'if(this AND this)'
In a set of functions, you put one function, end with a semi colon, then just put the next.
Often on the next line, but it doesn't have to be.
and then i need the ; and waitframes()
Yes, finish functions with ;
And Waitframe(); is what you want, not Waitframes();
The second is for waiting more than one frame, and what happens is that the loop repeats, and will keep looping the single waitframe for the number of frames necessary.
BUT!
This part is just an excersize in syntax, not anything to do with what you need to put in that loop, because all that was necessary was one waitframe.
Also, I'm not sure that you understand scope properly:
//global
script{
// a
void run(){
int foo;
// b
while(true){
// c
if(1){
//d
}
//c
if(2){
//d
if(3){
//e
}
//d
}
//c
Waitframe();
}
//b
}
//a
}
The Global scope contains everything in your script file
Scope A contains everything within the script
Scope B contains everything within the void run
Scope C contains everything within the while loop
Scope D could be at the level of both if(1) and if(2)
Scope E contains evething within if(3)
So the while loop is within scope b, but things in the while loop are at scope c.
Different numbers of indentations show different scopes, so scope a is at one indentation, whereas scope d is at 4, within both ifs.
I always put my Waitframe() on the same scope as the while, even though it should technically be at scope c, and I always declare all integers on the same scope as the void run(), although they should tecnically be at scope b.
This is all theoretical, because you could write your script out on one line if you wanted, but it makes it a lot easier to read if you get your scope correct.
im planning on having 5 ffcs. the first is the beast that "controls" the eyes. its basically a blank ffc that will die after all of the eyes are destroyed. so, i need the other 4 to be the ones moving. the big one just kinda sits there.
Interesting, if a little complex.
the other 4 move around ONLY on the top half of the screen. they move around pretty randomly. they bounce off of certain combos, which should be set via a D: number because if its set to bounce off unwalkable combos, then it wont move seeing as to how the whole top half of the screen is un-walkable damage combos. I think i only need it to bounce from 2 combos though.
Yeah that's not too hard, I've been scripting random motion quite a bit recently anyway, check the script showcase, I have a random motion script you might find interesting in it.
and at some point, i need the eyes to be able to be pulled toward you via hookshot.
I don't think this is feasable, but other people have said it is.