User Tag List

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 11

Thread: 1 or more triforce triggers secret combos?

  1. #1
    Octorok Hot Water Music's Avatar
    Join Date
    Dec 2002
    Age
    34
    Posts
    215
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    1,396
    Level
    12
    vBActivity - Bars
    Lv. Percent
    67.71%

    1 or more triforce triggers secret combos?

    For my quest, I got this KFC place that when you have a triforce, it appears, because I want the effect that the place moved to a different location over time.

  2. #2
    Octorok Dan Furst's Avatar
    Join Date
    Oct 2005
    Age
    39
    Posts
    368
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    1,501
    Level
    13
    vBActivity - Bars
    Lv. Percent
    9.59%

    Re: 1 or more triforce triggers secret combos?

    On the screens where the building moves from and to, place the trigger enemy, and make an ffc with

    Code:
    if((Game->LItems[1] & LI_TRIFORCE) == LI_TRIFORCE)
    Then, inside the if statement, you could set the trigger enemy's HP to 0 with

    Code:
    npc trigger = Screen->LoadNPC(1);
    trigger->HP = 0;
    That will activate the secret combos (Enemies->Secret), which are your building on the screen it moves to, and grass/rock where it moves from.

  3. #3
    Octorok Hot Water Music's Avatar
    Join Date
    Dec 2002
    Age
    34
    Posts
    215
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    1,396
    Level
    12
    vBActivity - Bars
    Lv. Percent
    67.71%
    LI_TRIFORCE is undeclared.

    Can you set up how exactly how it should be?

  4. #4
    Developer
    ZC Developer

    Join Date
    Aug 2006
    Location
    Australia
    Age
    37
    Posts
    2,777
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    6,851
    Level
    25
    vBActivity - Bars
    Lv. Percent
    37.71%

    Re: 1 or more triforce triggers secret combos?

    You need this line of code at the start:
    Code:
    import "std.zh"

  5. #5
    Octorok Hot Water Music's Avatar
    Join Date
    Dec 2002
    Age
    34
    Posts
    215
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    1,396
    Level
    12
    vBActivity - Bars
    Lv. Percent
    67.71%

    Re: 1 or more triforce triggers secret combos?

    I realized that but it's still not working

  6. #6
    Octorok Dan Furst's Avatar
    Join Date
    Oct 2005
    Age
    39
    Posts
    368
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    1,501
    Level
    13
    vBActivity - Bars
    Lv. Percent
    9.59%

    Re: 1 or more triforce triggers secret combos?

    Post the script you're trying to compile and I'll take a look at it. Also, what build are you using?

  7. #7
    Octorok Hot Water Music's Avatar
    Join Date
    Dec 2002
    Age
    34
    Posts
    215
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    1,396
    Level
    12
    vBActivity - Bars
    Lv. Percent
    67.71%

    Re: 1 or more triforce triggers secret combos?

    latest n greatest


    Code:
    import "std.zh"
    ffc script secrets {
    void run(){
    if((Game->LItems[1] & LI_TRIFORCE) > 0){
    npc trigger = Screen->LoadNPC(1);
    trigger->HP = 0;
    }
    }
    }

  8. #8
    Octorok Dan Furst's Avatar
    Join Date
    Oct 2005
    Age
    39
    Posts
    368
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    1,501
    Level
    13
    vBActivity - Bars
    Lv. Percent
    9.59%

    Re: 1 or more triforce triggers secret combos?

    I got it to work. Example quest can be found here.

    The only setback is that the secret combos trigger after the screen is fully loaded. If there is a way around that, well, I'd like to know.

    Edit: I see that if you check Permanent Enemies->Secrets in the Screen Data, then the only time you see it change is the first time. After that it scrolls nicely.

  9. #9
    Octorok Hot Water Music's Avatar
    Join Date
    Dec 2002
    Age
    34
    Posts
    215
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    1,396
    Level
    12
    vBActivity - Bars
    Lv. Percent
    67.71%

    Re: 1 or more triforce triggers secret combos?

    Thank you.

    I'm honestly not sure how to set up this type of scripting.

  10. #10
    Octorok Dan Furst's Avatar
    Join Date
    Oct 2005
    Age
    39
    Posts
    368
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    1,501
    Level
    13
    vBActivity - Bars
    Lv. Percent
    9.59%

    Re: 1 or more triforce triggers secret combos?

    I'll just be very thorough.

    In the example quest file, go to Tools -> Scripts -> Compile ZScript. Then export it to 'script.z'. Then open your quest file. Tools -> Scripts -> Compile ZScript -> Import. Select the z file you just exported. Compile, press any key. Then, click on the name of the script on the right, click on any open slot on the right (probably #1), and press the "<<" button, then ok. It should say scripts have been successfully loaded into script slots.

    Now go to the first screen that you want to change. Put secret flag #16 over the combos you want to "be removed" and select the secret combo to look like ground. You can of course use flags 16-31 if you like. Now, put a trigger enemy as the only enemy on the screen, and check Enemies->Secret, Permanent Enemies->Secret, and No Secret Sound in the Screen Flags. Now, go to Data -> Freeform Combos. Edit combo #1 (or any number, actually). Give it a fully transparent combo. Select script #1 (or whichever slot you loaded the script into). Click OK, Done.

    Now repeat the previos paragraph on the screen which the building/object moves to. Use secret combos to make the building appear.

    Make sure that the level number of the dmap of the dungeon you are getting the triforce piece in is 1. That should do it. If you want to use the script to check for other levels' triforce pieces, you'd need to change the argument inside of Game->LItems[] from 1 to whatever.

    (If you wanted to do it right, you would change run() to run(int n) and use Game->LItems[n]. Then, when you make the freeform combos on the screens, you would go to the third tab labeled "Arguments" and put the level number you want the screen to change after in D0.)

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