User Tag List

Results 1 to 8 of 8

Thread: Give A Key To Another Level

  1. #1
    Lynel
    ZC Developer
    pkmnfrk's Avatar
    Join Date
    Jan 2004
    Location
    Toronto
    Age
    37
    Posts
    1,248
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    3,161
    Level
    18
    vBActivity - Bars
    Lv. Percent
    15.13%

    Give A Key To Another Level

    Real simple snippet today, with debatable use, but here it is anyway:

    Code:
    //Gives link a key for level (CurLevel - 9)
    item script LevelXKey {
    	void run() {
    		Game->LKeys[Game->GetCurLevel() - 9]++;
    	}
    }
    Basically, you assign this script to an item, and it gives you a key in the numbered level (X - 9). What is the purpose, you ask? Well, let me answer!

    I came up with this to go with an idea for a quest I want to make. In this quest, there are seventeen main dungeons. There's Levels 1 - 9, which are as in an ordinary quest (Triforce pieces/Ganon/whatever), and then there's Levels A - H (numbered 10 - 17). These extra levels are actually prerequisites to competing the first eight dungeons. This is accomplished by sticking a locked door at the entrance to each dungeon.

    I created an item of type "Triforce Pieces", gave it a "Cutscene" of 1, and this script, and suddenly I have an end of dungeon item that "unlocks" another dungeon!

    The tl;dr version: If you give this script to a Triforce item, and put this item in levels 10 - 17, you can use it to unlock levels 1 - 8.
    Tale of the Cave - a web comic - Updates Monday, Wednesday, Friday
    ZC Tutorials - Tutorials and Script Library - Updated July 30, 2008
    ZeldaGuard - Corruption in my save files? It's more likely than you think!
    I do script requests!

  2. #2
    &&
    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,322
    Level
    26
    vBActivity - Bars
    Lv. Percent
    11.54%

    Re: Give A Key To Another Level

    When I read the topic title I thought it was gonna be a little more like this:
    Code:
    ffc script LevelKey{
    	void run(int level){
    		Game->LKeys[level]++;
    	}
    }

  3. #3
    Lynel
    ZC Developer
    pkmnfrk's Avatar
    Join Date
    Jan 2004
    Location
    Toronto
    Age
    37
    Posts
    1,248
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    3,161
    Level
    18
    vBActivity - Bars
    Lv. Percent
    15.13%

    Re: Give A Key To Another Level

    I only just now realized that the arguments tab in the item editor also applies to the pickup script, as well as the use script? Dur.

    Of course, to use your script, you would need a separate item for every level for which you want to give a key.
    Tale of the Cave - a web comic - Updates Monday, Wednesday, Friday
    ZC Tutorials - Tutorials and Script Library - Updated July 30, 2008
    ZeldaGuard - Corruption in my save files? It's more likely than you think!
    I do script requests!

  4. #4
    &&
    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,322
    Level
    26
    vBActivity - Bars
    Lv. Percent
    11.54%

    Re: Give A Key To Another Level

    Why's that?
    It's an ffc script.

  5. #5
    Lynel
    ZC Developer
    pkmnfrk's Avatar
    Join Date
    Jan 2004
    Location
    Toronto
    Age
    37
    Posts
    1,248
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    3,161
    Level
    18
    vBActivity - Bars
    Lv. Percent
    15.13%

    Re: Give A Key To Another Level

    Oh, hey, look at that. So it is. Do note that mine is an item script.

    In other words, our scripts are totally different, and used for different purposes?
    Tale of the Cave - a web comic - Updates Monday, Wednesday, Friday
    ZC Tutorials - Tutorials and Script Library - Updated July 30, 2008
    ZeldaGuard - Corruption in my save files? It's more likely than you think!
    I do script requests!

  6. #6
    &&
    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,322
    Level
    26
    vBActivity - Bars
    Lv. Percent
    11.54%

    Re: Give A Key To Another Level

    Well, I just posted what I thought when I saw the thread title

    If you're using yours to give Link a key when he recieves a triforce piece though, and you're using a cutscene to do it, placing this script on one of the screens of the cutscene would acheive the same effect.
    Not that it's better, just a different way of doing it.

  7. #7
    Lynel
    ZC Developer
    pkmnfrk's Avatar
    Join Date
    Jan 2004
    Location
    Toronto
    Age
    37
    Posts
    1,248
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    3,161
    Level
    18
    vBActivity - Bars
    Lv. Percent
    15.13%

    Re: Give A Key To Another Level

    True. Again, I wrote it for the purpose I described, and thought "Hey, someone else might be able to use this!"

    Also, two minor flaws with your script:

    1. You can trigger it more than once, and
    2. You could trigger it without actually getting the Triforce piece.

    And, just for completeness' sake, I could also achieve the effect I wanted with a script like this:

    Code:
    ffc script UnlockLevelIfCompletedOtherLevel {
      void run(int lev) {
        if((Game->LItems[lev] & LI_TRIFORCE) != 0) {
          Screen->Door[DIR_UP] = D_OPEN;
        }
      }
    }
    Tale of the Cave - a web comic - Updates Monday, Wednesday, Friday
    ZC Tutorials - Tutorials and Script Library - Updated July 30, 2008
    ZeldaGuard - Corruption in my save files? It's more likely than you think!
    I do script requests!

  8. #8
    &&
    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,322
    Level
    26
    vBActivity - Bars
    Lv. Percent
    11.54%

    Re: Give A Key To Another Level

    Well, not if it's in a cutscene.
    If you put it on a screen you can only enter once, you can only get it once.

    And that's true, but if you put it on a screen where you're warped on top of a triforce item (I'm probably imagining this differently to you), there would be a 4 frame gap between getting one and getting the other.

    Yeah, you could do that if you were using the door template tool. Can't say I like it personally.

    Although it wouldn't be hard to change it to work without using the template.

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