Results 1 to 6 of 6

Thread: Saving in a textbased adventure/rpg game.

  1. #1

    Thread Starter
    New Member
    Join Date
    Dec 2000
    Posts
    8

    Question

    I do not know how to save without all the variables being erased.

    Could anybody point me to a website, or show me how to?
    Damn Clone Panel

  2. #2
    Frenzied Member HarryW's Avatar
    Join Date
    Jan 2000
    Location
    Heiho no michi
    Posts
    1,827
    Look up in your help files these functions:

    Open #
    Close #
    Get #
    Put #
    Write #
    Print #
    Input #

    You can create a file on the hard disk and save all your variables in a certain order, then just read them all again in that order when you start the game up again.

    It's not complicated. File access is something everyone should know how to use, so check it out.
    Harry.

    "From one thing, know ten thousand things."

  3. #3
    Guest
    Code:
    Open "Game.txt" For Output As #1
    Write #1, HitPoints, Strength, Defense, Level
    Close #1

  4. #4

    Thread Starter
    New Member
    Join Date
    Dec 2000
    Posts
    8

    thats nice code but

    how do you get the info that was written?
    Damn Clone Panel

  5. #5
    Frenzied Member HarryW's Avatar
    Join Date
    Jan 2000
    Location
    Heiho no michi
    Posts
    1,827
    If you use Write # then you can use Input # to get the info back again and store it in variables.

    Code:
    Open "Game.txt" For Output As #1
       Input #1, HitPoints, Strength, Defense, Level
    Close #1
    That would read those variables back in from the file.
    Harry.

    "From one thing, know ten thousand things."

  6. #6

    Thread Starter
    New Member
    Join Date
    Dec 2000
    Posts
    8
    Thanx for all the help... i really appreciate it.

    I don't care much for the cheating part, as this is a school project and im sure my teacher won't be cheating.

    once again, thanks.
    Damn Clone Panel

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width