User Tag List

Page 2 of 2 FirstFirst 1 2
Results 11 to 19 of 19

Thread: Bridge Extendor

  1. #11
    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,145
    Level
    18
    vBActivity - Bars
    Lv. Percent
    11.3%

    Re: Bridge Extendor

    Well, I did it my way for three reasons:

    1. The code is not much smaller compiled if you combine them, and,
    2. I don't want to blindly reset the regular flag if it's triggered by the inherent flag, and,
    3. Vice-versa for the inherent flag (which changes automatically, AFAIK).

    My code is a little bit more "correct", so to speak, since it handles inherent flags properly, but the two snippets are effectively the same.
    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!

  2. #12
    &&
    ZC Developer
    Joe123's Avatar
    Join Date
    Sep 2006
    Age
    33
    Posts
    3,061
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    7,306
    Level
    26
    vBActivity - Bars
    Lv. Percent
    9.19%

    Re: Bridge Extendor

    Quote Originally Posted by pkmnfrk View Post
    2. I don't want to blindly reset the regular flag if it's triggered by the inherent flag, and,
    3. Vice-versa for the inherent flag (which changes automatically, AFAIK).
    Ah, I didn't think of that.

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

    Re: Bridge Extendor

    Is there a way to link this script with a freeform combo script, so that the combo that is created can be changed on a screen by screen basis? E.g. on one screen the item creates a bridge, on another it creates land where lava was, etc.
    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?


  4. #14
    Wizrobe C-Dawg's Avatar
    Join Date
    Jan 2002
    Posts
    4,205
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    6,614
    Level
    25
    vBActivity - Bars
    Lv. Percent
    0.38%

    Re: Bridge Extendor

    This is great. Simple script with powerful game mechanic applications.

    I like the idea of making this script a consumable item that the player needs to collect and use. Just like keys in dungeons. Makes shops more important in the game, and gives you more things to stash away. Don't have to use game counters to keep track of the number of items left. Just use the item flags that potions use to let the player collect more and decrement when used.

    Sort of off topic; some other simple scripts you could use to add flavorful utility items would include:
    (1) Warp consumables that take the player to the last town visited;
    (2) Weapon consumables - scripted weapons on consumable items (like bombs);
    (3) Perhaps miniature versions of full items that are consumable, used until the player finds the real item - a rope that acts as a very short hookshot?
    (4) Various potions - with short-term effects on the player. Like a power potion that adds a scripted weapon to the player's attack, a speed potion that increases walking speed, defense potion that surrounds player with block-all combos, etc.

  5. #15
    Gibdo beefster09's Avatar
    Join Date
    Mar 2006
    Age
    31
    Posts
    699
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    2,713
    Level
    16
    vBActivity - Bars
    Lv. Percent
    98.24%

    Re: Bridge Extendor

    Quote Originally Posted by russadwan View Post
    Is there a way to link this script with a freeform combo script, so that the combo that is created can be changed on a screen by screen basis? E.g. on one screen the item creates a bridge, on another it creates land where lava was, etc.
    I was going to, but then I realized it can be done very easily with secret combos. We don't need scripts to replace already existing features.

    Oh, wait, now I know what you mean- so each bridge is different for each screen which the item can be used on.

    Code:
    ffc script BridgeExtender {
        void run(int bridge_combo, int bridge_flag, intSFX) {
            bool found = false;
    	while((this->X-8 > Link->X) || (this->X+8 < Link->X) || (this->Y-15 > Link->Y) || (this->Y < Link->Y)) {
                for(int i = 0; i < 176; i++) {
                    if(Screen->ComboF[i] == bridge_flag) {
                        Screen->ComboD[i] = bridge_combo;
                        Screen->ComboF[i] = 0;
                        found = true;
                   } else if (Screen->ComboI[i] == bridge_flag) {
                        Screen->ComboD[i] = bridge_combo;
                        // I think the inherent flag will change automatically?
                        found = true;
                    }
                }
    	}
            if (found) { 
                Game->PlaySound(SFX);
                Screen->TriggerSecrets(); //<-I'm pretty sure that's not right. I couldn't find the proper notation in the ZScript documentation.
    	}
        }
    }
    Avatar: Just who the SPAAAACE do you think I am?

  6. #16
    &&
    ZC Developer
    Joe123's Avatar
    Join Date
    Sep 2006
    Age
    33
    Posts
    3,061
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    7,306
    Level
    26
    vBActivity - Bars
    Lv. Percent
    9.19%

    Re: Bridge Extendor

    You can't just trigger secrets like that I'm afraid Beefster, you have to put trigger combos under Link's feet and all sorts of such nonsense, it's really rather round-about and not particularily simple.

    What's so bad about the whistle, anyway?

  7. #17
    Wizrobe The_Amaster's Avatar
    Join Date
    Dec 2005
    Location
    St. Mystere
    Age
    33
    Posts
    3,803
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    vBActivity - Stats
    Points
    8,813
    Level
    28
    vBActivity - Bars
    Lv. Percent
    26.49%

    Re: Bridge Extendor

    Can't you just set it as a standard FFC that triggers off of an item activation?
    And, looking into the future and reading Joe's post (oooh, spooky) can it be written using arguments like Beefster's so that the bridge combo can vary from screen to screen?

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

    Re: Bridge Extendor

    Why yes, yes you can.
    Code:
    bool bridge = false;
    
    ffc script BridgeExtender {
        void run(int bridge_combo, int bridge_flag, int sSFX, int fSFX) {
            int i;
            bool found = false;
    	while(!bridge){
    	Waitframe();
    	}
    	bridge = false;
            for(i = 0; i < 176; i++) {
                if(Screen->ComboF[i] == bridge_flag) {
                    Screen->ComboD[i] = bridge_combo;
                    Screen->ComboF[i] = 0;
                    found = true;
                } else if (Screen->ComboI[i] == bridge_flag) {
                    Screen->ComboD[i] = bridge_combo;
                    // I think the inherent flag will change automatically?
                    found = true;
                }
            }
            if (found){ Game->PlaySound(sSFX); }else{ Game->PlaySound(fSFX);}
        }
    }
    
    item script brigeextender{
    	void run();
    		bridge = true;
    	}
    }
    EDIT: Damn you edited your post!
    Edit it back it was fine! =P

  9. #19
    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,145
    Level
    18
    vBActivity - Bars
    Lv. Percent
    11.3%

    Re: Bridge Extendor

    As an aside, a feature we need to bug the devs about is being able to set Screen->D[] in ZQuest. That way, this script would be trivial and generic and stuff:

    Code:
    //Places tiles down when item is used.
    
    const int bridge_flag = 98; //change this to the indicative flag
    
    item script bridgeextender {
        void run() {
            int i;
            bool found;
            found = false;
            for(i = 0; i < 176; i++) {
                if(Screen->ComboF[i] == bridge_flag) {
                    Screen->ComboD[i] = Screen->D[0];
                    Screen->ComboF[i] = 0;
                    found = true;
                } else if (Screen->ComboI[i] == bridge_flag) {
                    Screen->ComboD[i] = Screen->D[0];
                    // I think the inherent flag will change automatically?
                    found = true;
                }
            }
            if (found) Game->PlaySound(SFX_SECRET);
        }
    }
    If you want to have this functionality, put down an FFC on the screen with this script:

    Code:
    //sets Screen->D[whatever] to something
    
    ffc script setScreenD {
      void run(int d, int v) {
        Screen->D[d] = v;
      } 
    }
    Set D0 to 0, and D1 to the bridge combo. Then, place it on the bridge screen, and use my item script as above, and you can have any bridge combo you want on any screen.

    Edit: I've added these script to my website.
    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!

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