User Tag List

Results 1 to 10 of 10

Thread: Global Integers

  1. #1
    &&
    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,304
    Level
    26
    vBActivity - Bars
    Lv. Percent
    8.82%

    Global Integers

    The system does save global integers when you save and quit the game, right?

    I think I'm actaully going to cry if it doesn't...

    I'm locked out of initial data, and Link starts with all of the items at the moment, so I put this clause into my global script:
    Code:
    		if(init == 0){
    			Link->Item[13] = false;
    			Link->Item[125] = false;
    			Link->Item[23] = false;
    			Link->Item[10] = false;
    			Link->Item[127] = false;
    			Link->Item[54] = false;
    			Link->Item[52] = false;
    			Link->Item[31] = false;
    			Link->Item[29] = false;
    			Link->Item[126] = false;
    			Link->Item[91] = false;
    			Link->MaxHP = 16*8;
    			Link->HP = 16*8;
    			Game->Counter[2] = 4;
    			init = 1;
    		}
    And I have a global integer called init. But when I save and restart the game after getting an item, it still removes that item from Link

  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,143
    Level
    18
    vBActivity - Bars
    Lv. Percent
    10.68%

    Re: Global Integers

    Globals should save, yes. Where, exactly, is init declared?
    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
    &&
    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,304
    Level
    26
    vBActivity - Bars
    Lv. Percent
    8.82%

    Re: Global Integers

    import "std.zh"

    bool bluetunic = false;
    int bsw1 = 0; int bsw2 = 0;
    bool redtunic = false;
    int rsw1 = 0; int rsw2 = 0;
    bool goldtunic = false;
    int gsw1 = 0; int gsw2 = 0;
    int usewhistle; int usecape;
    int noroll = 0;
    const int nerm = 26;
    const int invis = 128;
    int yrupee = 0; int bombs = 0;
    int init; int medallion1 = 0;

    Here, right at the beggining.

  4. #4
    The Time-Loop Continues ZC Developer
    Gleeok's Avatar
    Join Date
    Apr 2007
    Posts
    4,826
    Mentioned
    259 Post(s)
    Tagged
    10 Thread(s)
    vBActivity - Stats
    Points
    12,959
    Level
    33
    vBActivity - Bars
    Lv. Percent
    26.26%

    Re: Global Integers

    Uuh...wtf, it should store 1 to init.

    Perhaps try:

    int init = 0;

    ...?

    Unless the game already uses an global int called init.

    Maybe try initialafantastico = 0; ..or something. lol
    This post contains the official Gleeok seal of approval. Look for these and other posts in an area near you.

  5. #5
    &&
    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,304
    Level
    26
    vBActivity - Bars
    Lv. Percent
    8.82%

    Re: Global Integers

    OK, I'll try that. I'm really at my wits end here, I've put so much work into this and if this doesn't work the whole thing is useless pretty much.
    I need a new build so much
    Why can't we have a new build?

    It's not working...
    What can I do...

    Eh, wait. It's not that thats causing the problem.
    Now that's strange.
    Because the script also set's Links bombs to 4, but they didn't get reset.

    Would someone mind taking a look at my quest to see if they can work out why it's happening?

  6. #6
    The Time-Loop Continues ZC Developer
    Gleeok's Avatar
    Join Date
    Apr 2007
    Posts
    4,826
    Mentioned
    259 Post(s)
    Tagged
    10 Thread(s)
    vBActivity - Stats
    Points
    12,959
    Level
    33
    vBActivity - Bars
    Lv. Percent
    26.26%

    Re: Global Integers

    Well heck, i'm using 675 still. there hasn't been that many changes.

    Are you by anychance using 2 global scripts, or is init part of an ffc script?
    This post contains the official Gleeok seal of approval. Look for these and other posts in an area near you.

  7. #7
    &&
    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,304
    Level
    26
    vBActivity - Bars
    Lv. Percent
    8.82%

    Re: Global Integers

    Yes but the changes that there have been apply to me quite significantly

    * Damage combos now no longer do 1/16 of a heart of damage sometimes when "Full Priority Damage Combos" is enabled.
    * Opening cheats or init data will no longer crash some quests where the bomb ratio is 0
    * Fixed the bug that allowed 'land-swimming' with walkable water
    * Fixed the bug that was preventing Dive Warps, Swim Warps and Dive for Item flags from working with walkable water - not to mention preventing Link from holding up items.
    * Giving Link a Ring with scripts will now change his colours appropriately

    The one about opening cheats or init data is the problem.

    And no, I'm not using two seperate global scripts, and I've tried putting it on an ffc script on the first screen instead, but that's just got the same problem.

    But...
    I'm starting to think it's something different, because my bombs didn't get set back to 4, it was just my candle being taken away this time...

  8. #8
    The Time-Loop Continues ZC Developer
    Gleeok's Avatar
    Join Date
    Apr 2007
    Posts
    4,826
    Mentioned
    259 Post(s)
    Tagged
    10 Thread(s)
    vBActivity - Stats
    Points
    12,959
    Level
    33
    vBActivity - Bars
    Lv. Percent
    26.26%

    Re: Global Integers

    ??? did you try setting it to 0? maybe post the script.
    This post contains the official Gleeok seal of approval. Look for these and other posts in an area near you.

  9. #9
    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,143
    Level
    18
    vBActivity - Bars
    Lv. Percent
    10.68%

    Re: Global Integers

    Well, I would try removing the whole init block anyway, to make sure that things are as they appear...
    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. #10
    &&
    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,304
    Level
    26
    vBActivity - Bars
    Lv. Percent
    8.82%

    Re: Global Integers

    Well, it's not to do with the script for sure.

    The script removes Link's items, and set bombs to 4.
    Items are being removed; bombs are not being set to 4.

    I sent it to Shoelace, and he said he hasn't had this saving issue, so I'm assuming it's ZC bug, maybe to do with my save file or something, I don't know.

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