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