How do i make a location save/load option?

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
Netherzapdos
Posts: 1
Joined: 16 Oct 2017 20:17

How do i make a location save/load option?

#1 Post by Netherzapdos » 16 Oct 2017 20:30

Back then i was making a text adventure game but i forgot that i needed like a save/load option so that the
user can start back where he left off, but the thing is i couldn't find one.

I'm watching tutorials that are compatible with RPG, it goes like this:

@echo off
set hp=2
set money=10
:home
echo YOUR HP IS %hp% AND YOUR MONEY IS %money%
pause
(
set /p hp=
set /p money=
)<savefile.dbl
goto home


Instead of being a variable save, how can i save it so that when the savefile loads, it loads the user back
onto the area where he left off?

I would really appreciate it if someone could help me here, thanks!

ShadowThief
Expert
Posts: 1166
Joined: 06 Sep 2013 21:28
Location: Virginia, United States

Re: How do i make a location save/load option?

#2 Post by ShadowThief » 16 Oct 2017 21:02

The code you've posted is for loading data from a save file. To store location, you'd have to include it in the save file.

Post Reply