PDA

View Full Version : Boss Music/Explosive Death



Dart Zaidyer
07-03-2008, 12:52 PM
I haven't been keeping up with the betas until recently, so I'm not sure if this is entirely possible with a script. Here we go...

I want a script that will start playing a midi (although I'd prefer alt music, if that's possible yet) when a target enemy is in the room, then defer to the Screen/DMap music when it is dead. (If that can't be done, it could just switch to another midi/alt music selection of my choice.) This will make it easier for me to build boss battle sequences where the fight music stops after you win instead of using screen midis and warp-related trickery.

I would also like a script that will make the target enemy "explode a lot" like in A Link to the Past before it dies. (Preferably by using harmless tiles instead of actual bomb explosions.) I'm not sure if this is even possible without using FFCs to represent the enemy instead of a plain ol' monster straight from the enemy editor, but I'm willing to try that if necessary.

beefster09
07-03-2008, 04:35 PM
For the first: about the closest you can get to that is an enemy indicator light which I implemented a couple days ago. And just use warps. It's easier for the scriptors.

The second: It's really easy. You can even use 0 Damage explosions so it won't hurt Link. It can even work on normal enemies.

Dart Zaidyer
07-04-2008, 08:37 PM
Alright, now I know this is possible.

http://www.youtube.com/watch?v=XAGlpcxbhsU

Jman demonstrates a custom boss that very clearly explodes a lot before it dies. Also, the music changes a couple of times. What's the code for this?

_L_
07-04-2008, 11:05 PM
For music:

ffc script BossMusic {
void run(int music, int music2) {
Waitframes(5);
if (Screen->NumNPCs() > 0) {
Game->PlayMIDI(music);
}
while(Screen->NumNPCs() > 0) {
Waitframe();
}
Game->PlayMIDI(music2);
}
}

For explosions, I'll need to know what kind of tiles you're using. 2x2 tile explosions? 1x1?

Dart Zaidyer
07-04-2008, 11:49 PM
Ah, that works excellently. Thanks! Didn't know it was that easy. (*cough* most of the functions still seem to be undocumented, or at least hard to look up!)
For explosions I prefer 2x2.

jman2050
07-05-2008, 02:16 PM
for the explosions in my video I simply generated a series of exploding weapon sprites in random positions (The DeadState variable is what makes them disappear quickly) and then generated the particles using weapon sprites with radom direction and speed variables.

C-Dawg
07-15-2008, 05:49 PM
Huh.

Just got done overhauling Zodiac's SHMUP code to take advantage of some of Gleeok's innovations in Gikarugen (getFFC! Why the FUCKLE didn't I think of that?). Next time I go back to overhaul old code, I'm going to merge some of your insights into using eweapons as explosion graphics into my own scripts, too. Good job, Jman.