User Tag List

Results 1 to 8 of 8

Thread: First Z-Script Custom Boss(Unfinished)

  1. #1
    Keese
    Join Date
    Aug 2005
    Posts
    56
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    831
    Level
    10
    vBActivity - Bars
    Lv. Percent
    8.57%

    First Z-Script Custom Boss(Unfinished)

    This is my first FFC custom boss. A lich that shoots fire.. just see the script.

    Code:
    ffc script firelich{
    
    //Variables//
    int flashcounter;
    int i;
    int state = 0;					//0 = Float
    						//1 = Fire three fireballs
    						//2 = Fire a large homing fireball
    						//3 = Dead
    int directionmem
    
    //Constants//
    int counter1 = 360;
    int counter2 = 540;
    int casting = not implemented;
    int normal = not implemented;
    int initCset = 7;
    
    
    	void run() {
    
    		//Pointers(Not used yet)
    		
    		ffc fire1 = Screen->LoadFFC(1);
    		ffc fire2 = Screen->LoadFFC(2);
    		ffc fire3 = Screen->LoadFFC(3);
    		ffc homing = Screen->LoadFFC(4);
    
    		while (true){
    		
    			if (this->Cset == 5 && flashcounter <= 1){
    				Game->PlaySound(SFX_Hurt);
    				if (Link->Item[I_SWORD4])
    				hp -= 8;
    				else
    				if (Link->Item[I_SWORD3])
    				hp -= 4;
    				else
    				if (Link->Item[I_SWORD2])
    				hp -= 2;
    				else
    				hp --;
    					
    				
    				if(hp == 0){
    				state = 3;
    				}
    				else
    				flashcounter == 32;
    				}
    				else
    				if (flashcounter > 0){
    					
    					if (flashcounter % 2 == 0){
    					this->Cset --;
    						if (this3->CSet < 6) 
    						this->CSet = 9;
    					}
    					flashcounter --;
    				}
    				else
    				if (this3->CSet != initCSet)
    				this3->CSet = initCSet;
    			}
    					
    			// Floating
    			// X Speed starts at 3
    			
    			
    			if(state == 0){
    
    				if(this->Vx == 0)
    				this->Vx = directionmem
    				
    				if(this->X <= 180){
    				this->Vx -= 6;
    				}
    
    				if(this->X <= 40){
    				this->Vx += 6;
    				}
    
    				if(counter1 != 0){	 //Time for the fireball attack?
    				counter1 -= 1;
    				}
    				else
    				{
    				state = 1;
    				}
    
    				if(counter2 != 0){	 //Time for the homing attack?
    				}
    				counter2 -= 1;
    				else
    				{
    				state = 2;
    				}
    			}
    
    			if(state == 1){	
    				
    				directionmem = this->Vx;
    				for ( i = 120; i>0; i-- ){ //Wait 2 seconds
    				Waitframe();				
    				this->Vx = 0;
    				this->Data = casting;
    				}				
    							//Position Projectiles
    				fire1->X = this->X-8;
    				fire1->Y = this->Y-8;
    				fire2->X = this->X;
    				fire2->X = this->Y-8;
    				fire3->X = this->X+8;
    				fire3->X = this->Y-8;
    				counter1 = 360;
    				state = 0;
    			}
    
    			if(state == 2){	
    
    				directionmem = this->Vx;
    				for ( i = 120; i>=0; i-- ){ //Wait 2 seconds
    				Waitframe();
    				this->Vx = 0;				
    				this->Data = casting;
    				}
    				
    				this->Data = normal;
    				homing->X = this->X;
    				homing->Y = this->Y-8;
    				counter2 = 360;
    				state = 0;
    			}
    
    			if(state == 3){
     			
    			Game->PlaySound(SFX_GROAN);
      			ffc this = Screen->LoadFFC(6); //Dying animation, gives HC too
    			Quit();
    			}
    			Waitframe();
    		
    		} //End of while loop
    	 } //End of void run
    } //End of FFC

  2. #2
    Developer
    ZC Developer

    Join Date
    Aug 2006
    Location
    Australia
    Age
    37
    Posts
    2,777
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    6,851
    Level
    25
    vBActivity - Bars
    Lv. Percent
    37.73%

    Re: First Z-Script Custom Boss(Unfinished)

    Uh, technically the "first" ZScript custom boss is the ZScript version of that Red Aquamentus I wrote last year. Now with sound effects!

    Speaking of which, I should probably get CMotW #3 done at some point... possibly using that new ghosting technique...

  3. #3
    Keese
    Join Date
    Aug 2005
    Posts
    56
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    831
    Level
    10
    vBActivity - Bars
    Lv. Percent
    8.57%

    Re: First Z-Script Custom Boss(Unfinished)

    Heh, I meant my first.

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

    Re: First Z-Script Custom Boss(Unfinished)

    Quote Originally Posted by _L_ View Post
    Uh, technically the "first" ZScript custom boss is the ZScript version of that Red Aquamentus I wrote last year. Now with sound effects!

    Speaking of which, I should probably get CMotW #3 done at some point... possibly using that new ghosting technique...
    Oh you kids and your online contests.

    I think I'll whip up four more custom bosses today and just quietly stick em in script showcase or in LSGMB.

  5. #5
    Keese
    Join Date
    Aug 2005
    Posts
    56
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    831
    Level
    10
    vBActivity - Bars
    Lv. Percent
    8.57%

    Re: First Z-Script Custom Boss(Unfinished)

    Added the attack phases. The projectile combo's functions are seperate from the script. The fireball attack is 3 fireballs that fly in an arch out from the boss. The homing attack is a giant that follows Link for 3 seconds, then flies off-screen diagonally.

    I am unsure about this part of the code working;

    Code:
    for ( i = 60; i>=0; i-- ){
    //Wait a second
    Waitframe();
    this->Vx = 0;
    this->Data = casting;
    Heh, my first time using the for structure. Will the waitframes slow down animation? And will the casting animation be reset everytime it loops?

  6. #6
    Developer
    ZC Developer
    jman2050's Avatar
    Join Date
    Jun 2001
    Location
    Do you really need to know
    Age
    37
    Posts
    3,883
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    5,709
    Level
    23
    vBActivity - Bars
    Lv. Percent
    46.19%

    Re: First Z-Script Custom Boss(Unfinished)

    the animation will not reset, since the combo timer is independent of everything else. And using a waitframe there is precisely what you were supposed to do if you wanted to wait 1 second.
    AGN's Resident Zelda Classic Developer and Sonic the Hedgehog Fanboy

  7. #7
    Keese
    Join Date
    Aug 2005
    Posts
    56
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    831
    Level
    10
    vBActivity - Bars
    Lv. Percent
    8.57%

    Re: First Z-Script Custom Boss(Unfinished)

    I like your Aquamentus flashing routine, L, and I hope you don't mind me borrowing it.:)

    Code:
    				if(hp == 0){
    				Dying(this6);
    				}
    				else
    				flashcounter == 32;
    				}
    				else
    				if (flashcounter > 0){
    					
    					if (flashcounter % 2 == 0){
    					this->Cset --;
    						if (this3->CSet < 6) 
    						this->CSet = 9;
    					}
    					flashcounter --;
    				}
    				else
    				if (this3->CSet != initCSet)
    				this3->CSet = initCSet;
    			}
    Can you (or someone else) explain to me how it works? Does there have to be a flag on the combo that changes it to CSet5? And I assume Dying(this6) would change the current FFC to the 6th?

  8. #8
    Keese
    Join Date
    Aug 2005
    Posts
    56
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    831
    Level
    10
    vBActivity - Bars
    Lv. Percent
    8.57%

    Re: First Z-Script Custom Boss(Unfinished)

    Now it's done, but I don't know if it's even functional. At the end, do I need ffc in front of this->?

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