User Tag List

Results 1 to 2 of 2

Thread: [Summer 08] Bottomless Pits and Lava

  1. #1
    &&
    ZC Developer
    Joe123's Avatar
    Join Date
    Sep 2006
    Age
    33
    Posts
    3,061
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    7,321
    Level
    26
    vBActivity - Bars
    Lv. Percent
    11.3%

    [Summer 08] Bottomless Pits and Lava

    How to use the Bottomless Pit script
    By Joe123
    I wrote this guide out for someone at Pure, so I thought I'd add the script to the Expo.

    Code:
    const int linkfalling = 0; // set here the first tile of your 5 tile Link Falling animation
    const int linklava = 0; // set here the first tile of your 5 tile Link Drowning animation
    const int fallingsfx = 0; // set here the SFX that plays when Link falls
    const int lavasfx = 0; // set here the SFX that plays when Link drowns in lava
    
    ffc script hole{
    	void run(int lava, int warpx, int warpy, int combotype, int tile){    
    	int sfx = fallingsfx;
    	if(warpx == 0 && warpy == 0){Waitframes(5); warpx = Link->X; warpy = Link->Y;}
    	if(tile == 0){tile = linkfalling;}
    	if(combotype == 0){combotype = 35;}
    	if(lava != 0){if(tile == linkfalling){tile = linklava;}sfx = lavasfx;}
    	int i; int x; int y; bool falling;
    
    		while(true){
    			falling = false;
    			while(Screen->ComboT[ComboAt(Link->X+8, Link->Y+8)] != combotype || Link->Z > 0 || Link->Action == LA_FROZEN) Waitframe();
    
    			i = 0;
    			while(Screen->ComboT[ComboAt(Link->X+8, Link->Y+8)] == combotype && Link->Z == 0 && Link->Action != LA_FROZEN && i < 5){
    				i++;
    				if(i==5) falling = true;
    			Waitframe();
    			}
    
    			if(falling){
    				Screen->ClearSprites(3);
    				Game->PlaySound(sfx);
    				x = Link->X; y = Link->Y;
    				for(i=0;i<40;i++){
    					Waitframe();
    					Link->Action = LA_DROWNING;
    					if(lava == 0) Screen->DrawTile(2, x, y, tile+Floor(i/8), 1, 1, 6, 1, 0, 0, 0, 0, true, 128);
    					else Screen->DrawTile(2, x, y, tile+Floor(i/8), 1, 1, 6, 1, 0, 0, 0, 0, true, 128);
    				}
    				Link->X = warpx; Link->Y = warpy;
    				Link->Action = 0;
    				Link->HP -= 8;
    				Game->PlaySound(19);
    			}
    		}
    	}
    }

    Part one - Setting up your graphics
    • Firstly, find the graphics that you want to be your bottomless pits. Make them into walkable combos, and give them the 'Centre Statue' attribute.
    • Then, find your 5-tile Link Falling animation. Rip it into your tilesheet, and make a note of the number of the first tile.
    • Find your 5-tile Link Drowning in Lava animation. Rip that into your tilesheet, and make a note of the number of the first tile of that too.
    • Find your 'Link Falling' and 'Link Drowning' Sound effects, add those to the sound effect editor, and make a note of the numbers of those too.
    Part two - Compiling the script
    • Open up Notepad.
    • On the first line, write
      Code:
      import "std.zh"
    • Leave a line, then copy in the script.
    • On the first 4 lines of the script, there are four 'integers' declared. They're noted (// before them) with what they do. Change the '0's here to match up with the four numbers you took down in the previous section.
    • Go to 'Save As', and type in a file name ending in '.z'. Then change the 'save as type' field to 'all files'. Save in your Zelda Classic folder.
    • Open up ZQuest, and go to 'Quest->Scripts->Compile ZScript'. Then select 'Import', and find your file.
    • Select 'Compile', and 'ok'.
    • The script should appear on the right hand side of the two dialog boxes. Click the arrow to assign it to a slot.
    Part three - Applying the script
    • Take the bottomless pit (or lava) combos you made earlier, and place them on your screen.
    • Go to Screen->Freeform Combos, and select the first FFC.
    • Give it a transparent combo which is not combo 0
    • On the 'script' drop-down menu, apply the script you assigned earlier.
    • Go to the 'Arguments' Tab.
    • D0: If you want the bottomless pits to be 'lava', set this to be '1'. Otherwise, leave as '0'.
    • D1 & D2: If you want the pit to warp you to a specific place on the screen when you fall in it, enter the coordinates here in the for (D1,D2). Otherwise, Link will be warped to where he enterd the screen.
    All combos that you made into 'Centre Statue' combos are now 'Bottomless Pit' combos.
    That's all there is to it.


    Pow!

  2. #2
    Lynel
    Join Date
    Jan 2005
    Posts
    1,296
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    vBActivity - Stats
    Points
    3,349
    Level
    18
    vBActivity - Bars
    Lv. Percent
    61%

    Re: Bottomless Pits and Lava

    This is very useful. I've been waiting for something like 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