User Tag List

Page 2 of 2 FirstFirst 1 2
Results 11 to 14 of 14

Thread: A better rotating FFC Script.

  1. #11
    Gibdo beefster09's Avatar
    Join Date
    Mar 2006
    Age
    31
    Posts
    699
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    2,712
    Level
    16
    vBActivity - Bars
    Lv. Percent
    97.9%

    Re: A better rotating FFC Script.

    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?

  2. #12
    Wizrobe C-Dawg's Avatar
    Join Date
    Jan 2002
    Posts
    4,205
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    6,613
    Level
    25
    vBActivity - Bars
    Lv. Percent
    0.19%

    Re: A better rotating FFC Script.

    That may be, beefster, but you'll find there is no difference in swapping X and Y if you're moving in a circle.

  3. #13
    The Time-Loop Continues ZC Developer
    Gleeok's Avatar
    Join Date
    Apr 2007
    Posts
    4,826
    Mentioned
    259 Post(s)
    Tagged
    10 Thread(s)
    vBActivity - Stats
    Points
    12,960
    Level
    33
    vBActivity - Bars
    Lv. Percent
    26.4%

    Re: A better rotating FFC Script.

    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.

  4. #14
    The Time-Loop Continues ZC Developer
    Gleeok's Avatar
    Join Date
    Apr 2007
    Posts
    4,826
    Mentioned
    259 Post(s)
    Tagged
    10 Thread(s)
    vBActivity - Stats
    Points
    12,960
    Level
    33
    vBActivity - Bars
    Lv. Percent
    26.4%

    Re: A better rotating FFC Script.

    Quote Originally Posted by C-Dawg View Post
    Well like this. Inside your while loop:

    this_ffc->X = sin(y);
    this_ffc->Y = cos(y);

    y++;


    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.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Armageddon Games is a game development group founded in 1997. We are extremely passionate about our work and our inspirations are mostly drawn from games of the 8-bit and 16-bit era.
Social