Interesting! When I do my trig calculations, I get sin for y coords and cos for x coords. I hope it isn't flipped in ZScript.
Interesting! When I do my trig calculations, I get sin for y coords and cos for x coords. I hope it isn't flipped in ZScript.
Avatar: Just who the SPAAAACE do you think I am?
That may be, beefster, but you'll find there is no difference in swapping X and Y if you're moving in a circle.
I'm having problems reproducing a patra type circle. So how would I go about producing 8 rotating ffc's to the patra effect?
This post contains the official Gleeok seal of approval. Look for these and other posts in an area near you.
I have no idea to how that would work. I tried about 20 variations of sin and cos trying to get a fireball to move in a circular pattern and nada. Beefster, could you perhaps post the fireball script, or maybe just bludgeon me to death with a college level math book, that would also work.
Gleeok not like trig.
Here's the last 2 monumental failures. And they are obviously initialized by another script...supposedly.
Code:ffc script ffc_wobble{ void run(){ int wobble = 0; while(true){ if(this->Y > 168||this->Y < 0||this->X > 248||this->X < 0){ this->X = 0; this->Y = 0; this->Vx = 0; this->Vy = 0; this->Data = 1; } this->X = Sin(wobble); this->Y = Cos(wobble); wobble++; Waitframe(); } } } ffc script ffc_wobble2{ void run(){ int wobble = 0; while(true){ if(this->Y > 168||this->Y < 0||this->X > 248||this->X < 0){ this->X = 0; this->Y = 0; this->Vx = 0; this->Vy = 0; this->Data = 1; } if(this->Vx != 0 || this->Vy != 0){ int x = this->Vx; int y = this->Vy; this->Vx = x *Sin(wobble); this->Vy = y *Cos(wobble); wobble++; } Waitframe(); } } }
This post contains the official Gleeok seal of approval. Look for these and other posts in an area near you.
There are currently 1 users browsing this thread. (0 members and 1 guests)