PDA

View Full Version : Miniboss portal script



pkmnfrk
12-09-2007, 06:00 AM
Purpose: In the Gameboy Zelda games, when you defeat a dungeon's miniboss, a portal appears, linking the starting room with the miniboss's room. This script allows you to reproduce this effect.

Miniboss Portal Script (http://zctut.com/mbportal.php) on ZCtut.com (Updated December 9, 2007)

I've updated the script, and moved it to my site, for central access. Now the script uses a better method of determining a miniboss's death.

Din
12-09-2007, 03:03 PM
Cool, nice to see that you are back and the site is back! :) I'll check it out right now!

Russ
12-09-2007, 03:16 PM
Awesome. But what exactly does the first augment do? The site says it is the level of the miniboss, to determine if the portal should appear at all. What exactly should I set the augment to?

pkmnfrk
12-09-2007, 06:57 PM
It requires a bit of explanation. In the concept quest I'm working on, I have a global variable (mb_defeated) to keep track of which baddies Link has defeated. Each bit in this variable represents one mini boss. Bit 1 is Level 1's mini boss, etc.

I've included everything in the script to make it happen right out of the box. So, in effect, you set D0 to 1 for Level 1's miniboss portal, etc. But, out of the box, no portals will ever appear unless you have another script setting these bits.

For example, let's say you have a custom boss in Level 1. You set the portals' D0 to 1, and you include this in the boss's script:


//Boss is defeated
mb_defeated = setbit(mb_defeated, 1, true);

That will set bit 1, and cause the portal to appear.

If you have some other means of keeping track of which boss is defeated, you can modify the script to suit. As an example, I originally used Screen->D[7] to check to see if 'the miniboss on this screen' was defeated. In this case, D0 could be the screen number, and it would look like this:


//Change this to how you determine the miniboss is dead
while(Game->GetScreenD(lev,7) == 0) {
Waitframe();
}

If you need more specific help, feel free to ask.