User Tag List

Results 1 to 3 of 3

Thread: Freeform Raft (Single-screen, walkable water)

  1. #1
    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.76%

    Freeform Raft (Single-screen, walkable water)

    Code:
    //
    // "Freeform Raft"
    // A freeform raft. If it's under your feet, you can move across water.
    // * Single screen only!
    // * Requires the "Link Drowns in Walkable Water" rule.
    // * Saves its position when you leave the screen!
    // * Doesn't support swim warps or dive warps.
    //
    // Flags:
    // * Run Script on Screen Init
    // Screen Variables Used:
    // * Current screen, d0
    // * Current screen, d1
    // 
    ffc script FreeformRaft
    {
      void run() {
        // On init:
        if (Screen->D[0] != 0 && Screen->D[1] != 0) {
          this->X = Screen->D[0];
          this->Y = Screen->D[1];
        }
        while(true) {
          Waitframe();
          // If Link is right on the raft, move him into the centre.
          if (Distance(Link->X+8, Link->Y+4, this->X+8, this->Y) < 4 && Link->Z == 0) {
            Link->X = this->X;
            Link->Y = this->Y-4;
            int dx = Link->X+8;
            int dy = Link->Y+12;
    
            // Keep Link above water until he reaches dry land again.
            while(Screen->ComboT[ComboAt(dx,dy)]==CT_WATER && Link->Jump == 0) {
              this->X = Link->X;
              this->Y = Link->Y+4;
              Waitframe();
              Link->Jump = 0;
              Link->Z = 0;
              dx = Link->X+8;
              dy = Link->Y+12;
              if (Link->Dir == DIR_UP) {
                dy -= 8;
              } else if (Link->Dir == DIR_DOWN) {
                dy += 4;
              } else if (Link->Dir == DIR_LEFT) {
                dx -= 8;
              } else if (Link->Dir == DIR_RIGHT) {
                dx += 8;
              } 
            }
            // Step off the raft
            for (int i=0; i<6; i++) {
              Link->InputUp = false;
              Link->InputDown = false;
              Link->InputLeft = false;
              Link->InputRight = false;
              if (Link->Dir == DIR_UP) {
                Link->InputUp = true;
              } else if (Link->Dir == DIR_DOWN) {
                Link->InputDown = true;
              } else if (Link->Dir == DIR_LEFT) {
                Link->InputLeft = true;
              } else if (Link->Dir == DIR_RIGHT) {
                Link->InputRight = true;
              }
              Waitframe();
            }
            // Store position
            Screen->D[0] = this->X;
            Screen->D[1] = this->Y;
          }
        }
      }
    }
    A little something I made for future use in NeoFirst.

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

    Re: Freeform Raft (Single-screen, walkable water)

    Neat! So can you use items on it? I was needing this for one ofmy quests bosses.
    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?


  3. #3
    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.76%

    Re: Freeform Raft (Single-screen, walkable water)

    The only rule is that you cannot use Roc's Feather.

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