User Tag List

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

Thread: 2 block triggers in one room

  1. #1
    Keese
    Join Date
    May 2007
    Age
    38
    Posts
    58
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    817
    Level
    10
    vBActivity - Bars
    Lv. Percent
    1.63%

    2 block triggers in one room

    The room has 4 push blocks, and I already made 4 block triggers
    to trigger a secret. If someone can show me how to make 4 extra block triggers triggering something different, I might be able to fill in the locations.

    I'm trying to make a puzzle similar to the two switches in Lttp. One triggers the door and the other triggers a trap.

  2. #2
    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,141
    Level
    18
    vBActivity - Bars
    Lv. Percent
    10.34%

    Re: 2 block triggers in one room

    Well, this isn't really a scripting question, but the only way to do this is with a script, so fine.

    What you're looking for is a script like this:

    Code:
    import "std.zh"
    
    ffc script otherblocktrigger {
    	void run() {
    		while(true) {
    			if( //fill in x, y and block combo (and add/remove lines as necessary)
    				Screen->ComboD[ComboAt(x,y)] == block combo &&
    				Screen->ComboD[ComboAt(x,y)] == block combo &&
    				Screen->ComboD[ComboAt(x,y)] == block combo &&
    				Screen->ComboD[ComboAt(x,y)] == block combo
    			) {
    				//'trigger' the secret
    				Screen->ComboD[ComboAt(x,y)] = secret combo;
    				Screen->ComboD[ComboAt(x,y)] = secret combo;
    				Screen->ComboD[ComboAt(x,y)] = secret combo;
    				Screen->ComboD[ComboAt(x,y)] = secret combo;
    				//any other special effects? Put 'em here.
    				
    				
    				Quit(); //no more.
    			}
    			Waitframe();
    		}
    	}
    }
    You need to fill in exactly what you want to do, but it should be fairly self-explanitory.
    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!

  3. #3
    Keese
    Join Date
    May 2007
    Age
    38
    Posts
    58
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    817
    Level
    10
    vBActivity - Bars
    Lv. Percent
    1.63%

    Re: 2 block triggers in one room

    Where can I find "std.zh"?

  4. #4
    Wizrobe
    Join Date
    Dec 2006
    Age
    29
    Posts
    3,693
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    8,935
    Level
    28
    vBActivity - Bars
    Lv. Percent
    42.85%

    Re: 2 block triggers in one room

    Quote Originally Posted by lupinealchemist View Post
    Where can I find "std.zh"?
    First of all, what version are youi using?
    Quote Originally Posted by rock_nog View Post
    Well of course eveything's closed for Easter - don't you know of the great Easter tradition of people barricading themselves up to protect themselves from the return of Zombie Christ?


  5. #5
    Keese
    Join Date
    May 2007
    Age
    38
    Posts
    58
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    817
    Level
    10
    vBActivity - Bars
    Lv. Percent
    1.63%

    Re: 2 block triggers in one room

    Quote Originally Posted by russadwan View Post
    First of all, what version are youi using?
    679b.

  6. #6
    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,141
    Level
    18
    vBActivity - Bars
    Lv. Percent
    10.34%

    Re: 2 block triggers in one room

    std.zh is located in your zelda classic folder. Unless you want to read it (which is very informative, especially the list of constants), though, you don't need to worry about it.

    Just, 'import "std.zh"' must be included at the top of every script file.
    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!

  7. #7
    Keese
    Join Date
    May 2007
    Age
    38
    Posts
    58
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    817
    Level
    10
    vBActivity - Bars
    Lv. Percent
    1.63%

    Re: 2 block triggers in one room

    I did what you said and now it looks like this:
    import "std.zh"

    ffc script otherblocktrigger {
    void run() {
    while(true) {
    if(
    Screen->ComboD[ComboAt(80, 64)] == 66 &&
    Screen->ComboD[ComboAt(128, 48)] == 66 &&
    Screen->ComboD[ComboAt(144, 96)] == 66 &&
    Screen->ComboD[ComboAt(96, 112)] == 66
    ) {
    Screen->ComboD[ComboAt(112, 80)] = 19;



    Quit();
    }
    Waitframe();
    }
    }
    }

    (I don't know how to paste the tabs/spaces properly)

    Is this in ASM or Zscript? I try to import it in ASM but it doesn't understand ("std.zh"), (,). Can someone show me how to properly import to either ASM or Zscript?

  8. #8
    Wizrobe
    Join Date
    Dec 2006
    Age
    29
    Posts
    3,693
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    8,935
    Level
    28
    vBActivity - Bars
    Lv. Percent
    42.85%

    Re: 2 block triggers in one room

    It is Zscript. First, save it in word as a .z file (when you save it just add .z to the end of thename. In Zquest, Tools-Scripts-Compli Zscript. Import-Load the .z file-compile. It is a freeform combo script, so put it into a freeform combo slot. On the screen, create a freeform combo and assign the script.
    Quote Originally Posted by rock_nog View Post
    Well of course eveything's closed for Easter - don't you know of the great Easter tradition of people barricading themselves up to protect themselves from the return of Zombie Christ?


  9. #9
    Keese
    Join Date
    May 2007
    Age
    38
    Posts
    58
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    817
    Level
    10
    vBActivity - Bars
    Lv. Percent
    1.63%

    Re: 2 block triggers in one room

    Now I have to learn how to assign FFCs.
    Anyway, thanks for the ".z" tip.

  10. #10
    Wizrobe
    Join Date
    Dec 2006
    Age
    29
    Posts
    3,693
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    8,935
    Level
    28
    vBActivity - Bars
    Lv. Percent
    42.85%

    Re: 2 block triggers in one room

    Quote Originally Posted by lupinealchemist View Post
    Now I have to learn how to assign FFCs.
    Anyway, thanks for the ".z" tip.
    On the screen, go to Data-Freeform combos. Select one and press edit. Assign a blank combo to it by clicking in the box and seting it to a black transparent combo. Then in the box that says scripts, select the script you want to assign to the freeform combo.
    Quote Originally Posted by rock_nog View Post
    Well of course eveything's closed for Easter - don't you know of the great Easter tradition of people barricading themselves up to protect themselves from the return of Zombie Christ?


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