Click to See Complete Forum and Search --> : Saving in a textbased adventure/rpg game.
Darklance{Grotto}
Dec 5th, 2000, 02:40 PM
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?
HarryW
Dec 5th, 2000, 05:23 PM
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.
Open "Game.txt" For Output As #1
Write #1, HitPoints, Strength, Defense, Level
Close #1
Darklance{Grotto}
Dec 7th, 2000, 11:13 AM
how do you get the info that was written?
HarryW
Dec 7th, 2000, 01:14 PM
If you use Write # then you can use Input # to get the info back again and store it in variables.
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.
Darklance{Grotto}
Dec 7th, 2000, 06:51 PM
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.
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.