Jump to content

Photo

Enemy Death Script and Vaati Boss Script


  • Please log in to reply
2 replies to this topic

#1 Kivitoe

Kivitoe

    Sponsored by Taco Bell

  • Members
  • Location:Beyond Sagittarius A*

Posted 18 July 2016 - 11:30 AM

For my new quest Fate of the Triforce, I need 2 scripts. I need a script that shows a string when an enemy dies and a script that creates a Vaati enemy that shoots a laser from its eye when it is open. The eye opens for 2 seconds every 10 seconds. Its weak point is when the eye opens, Link can then hit it with his level 2 boomerang. After 7 boomerang hits Link can finish him off using his sword. (Link can hit him anywhere then). Vaati then says something using the script mentioned above and explodes.

#2 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 18 July 2016 - 12:16 PM


Here's an ffc I quickly wrote up for you, for an easy to use boss death outro. It will work as long as there is only one enemy type (ID) that you are using as a boss, although it allows using more than one instance of that enemy.

I added in some bonus options for you, too.

Args:

D0: Enemy ID to treat as the 'boss'.
D1: The message to display when it dies.
D2: (optional) A fanfare sound effect (Quest->Audio->SFX) to play when the boss dies.
D3: (optional) Duration of the fanfare in SECONDS.
D4: (optional) MIDI that you want to use when the boss is dead. If set, this replaces whatever MIDI you were using when the boss was alive.


ffc script EasyBossDeath{
	void run(int npc_id, int message, int fanfare, int fanfare_dur, int midi){
		npc n; int q; bool match;
		Waitframes(5);
		for (q = 1; q <= Screen->NumNPCs(); q++){
			n = Screen->LoadNPC(q);
			if ( n->ID == npc_id ) {
				match = true; break;
			}
		}
		if (!match) {
			this->Script = 0; this->Data = 0; Quit();
		}

		while(NumNPCsOf(npc_id)){
			Waitframe();
		}
		if ( fanfare ) Game->PlaySound(fanfare);
		if ( fanfare_dur ) Waitframes(fanfare_dur*60);
		if ( midi ) Game->PlayMIDI(midi);
		Screen->Message(message);
		Waitframe();
		this->Script = 0; this->Data = 0; Quit();
	}
}
For Vaati, Dimentio submitted an awesome Vaati boss for EotM recently. It was the 'wind' themed contest, so you should consider using that.
  • ywkls and Kivitoe like this

#3 Kivitoe

Kivitoe

    Sponsored by Taco Bell

  • Members
  • Location:Beyond Sagittarius A*

Posted 18 July 2016 - 01:12 PM

Thanks!


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users