User Tag List

Page 3 of 7 FirstFirst 1 2 3 4 5 ... LastLast
Results 21 to 30 of 62

Thread: Sidescroll Ladder Script

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

    Re: Sidescroll Ladder Script

    Couldn't you just make 'hashover' into a global boolean?

  2. #22
    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,142
    Level
    18
    vBActivity - Bars
    Lv. Percent
    10.56%

    Re: Sidescroll Ladder Script

    I suppose, but I would have to make things complicated, and unless you use the hack you mentioned, you'll lose the hoverboots until the next time you touch a ladder.

    In light of this, I think it'll work best as a global script, which I'm just in the middle of preparing for general release.

    Edit: I've updated the ladder script. It now uses a global script. More details on global scripts (as I require you to use them) here: Global OnStart Script
    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. #23
    Gibdo zcAmazing's Avatar
    Join Date
    Jun 2007
    Age
    35
    Posts
    905
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    3,598
    Level
    19
    vBActivity - Bars
    Lv. Percent
    20.41%

    Re: Sidescroll Ladder Script

    Got notified. I will be trying this out shortly. EDIT: Actually, I will be trying out that global script, the update to it.

    Umm, please edit the link: "the ladder script." You are missing a "t" in between "c" and "u."
    Coming Soon - Pendants of the Underworld

    Quest for ZC. Only released when ZC 2.5 final is available. ON HIATUS About 88% done. Updated in 5/18/08

    Demo Available - For ZC 373
    Download
    You may need a tool to unzip files, go to www.7-zip.org.

    I have college now, worsening the hiatus.


    Visit my web pages! Click here.

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

    Re: Sidescroll Ladder Script

    (which, by themselves, cannot run more than one frame for no particular reason)
    I did see a reason for that once, but I forget what it is now. Might be in the pinned threads in scripting discussion.

    For your sake any mine,
    Should that be and?

    And also, howcome you always declare booleans, then set them on the next line?
    Code:
    bool somethingfoo;
    somethingfoo = true;
    like that?
    Code:
    bool somethingfoo = true;
    is just as acceptable isn't it?

  5. #25
    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,142
    Level
    18
    vBActivity - Bars
    Lv. Percent
    10.56%

    Re: Sidescroll Ladder Script

    All the reported typos are fixed (sheesh, my inner-dictionary must be out to lunch or something >_>)

    I do variables like that because I thought you couldn't initialize them on the same line.

    *tests*

    ... I coulda sworn I saw an error before... <_< updating scripts

    Edit: And, actually, the example you pasted is a typo. Or, a copy-and-pasto, rather. I intended to just have the declaration, before I started copying and pasting stuff in my code blocks -_-'''

    Anyway, fixed.
    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. #26
    Gibdo zcAmazing's Avatar
    Join Date
    Jun 2007
    Age
    35
    Posts
    905
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    3,598
    Level
    19
    vBActivity - Bars
    Lv. Percent
    20.41%

    Re: Sidescroll Ladder Script

    I have learned how a global script does in your neat tutorial site. There are problems with compiliation, here is how I set up your global script.
    Code:
    bool ladderhashover;
    bool onladder;
    
    global script ladder {
      void run() {
    
        while(true) {
    
          ladder(98);
    
          Waitframe();
        }
      }
    
      //Courtesy of Saffith/beefster09
      bool isSolid(int x, int y) {
        
        if(x<0 || x>255 || y<0 || y>175) return false;
        int mask=1111b;
          
        if(x &#37; 16 < 8)
          mask &= 0011b;
        else
          mask &= 1100b;
        
        if(y % 16 < 8)
          mask &= 0101b;
        else
          mask &= 1010b;
        
        int ret = Screen->ComboS[ComboAt(x, y)] & mask;
        return (ret!=0);
      
      }
      
      void ladder(int f) {
        int lc;
        
        lc = ComboAt(Link->X+8, Link->Y+15); //for speed
        
        if(Screen->ComboF[lc] == f || Screen->ComboI[lc] == f) {
          if(!onladder) {
            ladderhashover = Link->Item[I_HOVERBOOTS];
            Link->Item[I_HOVERBOOTS] = false;
            onladder = true;
          }
          
          if(Link->Jump < 0) Link->Jump = 0;
          if(Link->InputDown) {
            if(!isSolid(Link->X, Link->Y + 16)) Link->Y += 1;
          }
          if(Link->InputUp) {
            if(!isSolid(Link->X, Link->Y - 1)) Link->Y -= 1;
          }
        } else {
          if(onladder) {
            Link->Item[I_HOVERBOOTS] = ladderhashover;
            onladder = false;
          }
        }
      }
    }
    The errors in Pass 3 were returned was:
    TMP, LINE 37: ERROR S10: FUNCTION COMBOAT IS UNDECLARED.
    TMP, LINE 45: ERROR S10: FUNCTION COMBOAT IS UNDECLARED.
    TMP, LINE 49: ERROR S09: VARIABLE I_HOVERBOOTS IS UNDECLARED.
    TMP, LINE 50: ERROR S09: VARIABLE I_HOVERBOOTS IS UNDECLARED.
    TMP, LINE 63: ERROR S09: VARIABLE I_HOVERBOOTS IS UNDECLARED.
    Coming Soon - Pendants of the Underworld

    Quest for ZC. Only released when ZC 2.5 final is available. ON HIATUS About 88% done. Updated in 5/18/08

    Demo Available - For ZC 373
    Download
    You may need a tool to unzip files, go to www.7-zip.org.

    I have college now, worsening the hiatus.


    Visit my web pages! Click here.

  7. #27
    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,142
    Level
    18
    vBActivity - Bars
    Lv. Percent
    10.56%

    Re: Sidescroll Ladder Script

    Tsk, tsk, import "std.zh", my friend.

    I missed it from the tutorial, but, it should appear at the top of every .z 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!

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

    Re: Sidescroll Ladder Script

    This is because you didn't tell ZC to import std.zh.

    ComboAt is a utility routine, which turns a pixel reference number into coordinates for that pixel, and it's located in std.zh.

    Also, why do you have Saffith's bool within your global script?

    And how can you declare your own voids?

    I don't think I understand voids very well...

  9. #29
    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,142
    Level
    18
    vBActivity - Bars
    Lv. Percent
    10.56%

    Re: Sidescroll Ladder Script

    I beat you to it, but:

    The "isSolid" script is used by my script. That's why it's there. I credited it to Saffith and beefster09 because I didn't write it.

    As for it's location, it could be moved to the global namespace (i.e. outside of any script), but it's not that big a deal.
    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!

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

    Re: Sidescroll Ladder Script

    Damn, I didn't notice =P

    But won't it never be reached within that global script because of the loop?

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