User Tag List

Results 1 to 7 of 7

Thread: Light surrounding link

  1. #1
    Gibdo
    Join Date
    Mar 2004
    Age
    40
    Posts
    910
    Mentioned
    3 Post(s)
    Tagged
    1 Thread(s)
    vBActivity - Stats
    Points
    3,249
    Level
    18
    vBActivity - Bars
    Lv. Percent
    36.58%

    Light surrounding link

    I would like a FF combo script that light would surround link like in LTTP in dark rooms. all you would have is a bunch of black tiles with a hole in the center. assign a script that the FF combo follows link's movement.

  2. #2
    Is this the end?
    ZC Developer
    Saffith's Avatar
    Join Date
    Jan 2001
    Age
    41
    Posts
    3,389
    Mentioned
    178 Post(s)
    Tagged
    6 Thread(s)
    vBActivity - Stats
    Points
    6,433
    Level
    24
    vBActivity - Bars
    Lv. Percent
    70.1%

    Re: Light surrounding link

    The script itself isn't too hard. This should be enough:
    Code:
    const int X_OFFSET=248;
    const int Y_OFFSET=80;
    
    ffc script Darkness
    {
       void run()
       {
          while(true)
          {
             this->X=Link->X-X_OFFSET;
             this->Y=Link->Y-Y_OFFSET;
             Waitframe();
          }
       }
    }
    The X and Y offsets would be how far Link is from the top-left corner of the FFC.

    The problem is, FFCs don't appear until after the screen stops scrolling, so the screen would be visible while Link was still walking into it. You might be able to get around that by using a solid black overhead layer that instantly cycles to invisibility, but I'm not certain that would do it. Even if that works, I think the screen would light back up when Link started walking to the next. The carry-over flag might solve both problems, but I'm not at all certain about that.

  3. #3
    Gibdo
    Join Date
    Mar 2004
    Age
    40
    Posts
    910
    Mentioned
    3 Post(s)
    Tagged
    1 Thread(s)
    vBActivity - Stats
    Points
    3,249
    Level
    18
    vBActivity - Bars
    Lv. Percent
    36.58%

    Re: Light surrounding link

    Thanks! I'll try that!

  4. #4
    Gibdo
    Join Date
    Mar 2004
    Age
    40
    Posts
    910
    Mentioned
    3 Post(s)
    Tagged
    1 Thread(s)
    vBActivity - Stats
    Points
    3,249
    Level
    18
    vBActivity - Bars
    Lv. Percent
    36.58%

    Re: Light surrounding link

    Once I import that script, It gave me an error message saying "Unable to parse instruction 1 from script filename.txt The error was: Invalid instruction.. The command was (int) (X_OFFSET=248,)

    Any ideas why?

  5. #5
    Is this the end?
    ZC Developer
    Saffith's Avatar
    Join Date
    Jan 2001
    Age
    41
    Posts
    3,389
    Mentioned
    178 Post(s)
    Tagged
    6 Thread(s)
    vBActivity - Stats
    Points
    6,433
    Level
    24
    vBActivity - Bars
    Lv. Percent
    70.1%

    Re: Light surrounding link

    Don't use Import FF Script; use Compile ZScript.

  6. #6
    Gibdo
    Join Date
    Mar 2004
    Age
    40
    Posts
    910
    Mentioned
    3 Post(s)
    Tagged
    1 Thread(s)
    vBActivity - Stats
    Points
    3,249
    Level
    18
    vBActivity - Bars
    Lv. Percent
    36.58%

    Re: Light surrounding link

    OK, Thanks!

  7. #7
    Is this the end?
    ZC Developer
    Saffith's Avatar
    Join Date
    Jan 2001
    Age
    41
    Posts
    3,389
    Mentioned
    178 Post(s)
    Tagged
    6 Thread(s)
    vBActivity - Stats
    Points
    6,433
    Level
    24
    vBActivity - Bars
    Lv. Percent
    70.1%

    Re: Light surrounding link

    Come to think of it, the way tile width and height work, I'm pretty sure it'd take at least two screen-wide FFCs moving together to make this work.
    Unfortunately, it turns out you can't have FFCs that large - tile width and height are capped at 4 (I'd've mentioned it before, but I just found out myself). That means you need at least 12 of them to cover the 16*11 tile screen. If you want Link to be able to move anywhere near the corners, it'll take 48, since you basically have to cover an entire screen in each diagonal direction. You're only allowed to have 32 FFCs, so you can't do it that way. It'd require a more complex script, one which moves FFCs around so that the screen is always covered. That's a lot harder to do than just following Link, especially considering the language doesn't (currently) let you create arrays.
    I'm sorry to say it, but I don't think you'll be able to do this right now.

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