I want to make a RPG with scratch and i need to be able to save data. cookies would be a perfect solution for this. At the beginning of the game I would have:
[blocks]
<when green flag clicked>
ask "location drive of cookie"
<if><<not><{ cookie(name) }> >> at location
make cookie(name)
<else>Read cookie(name)
If load than cookie(name)
<end>
[/blocks]
and to save i would
[blocks]
<change{save num}by(1)>
clear cookie(name)-optional
write to cookie(name)
(Save num)+(user)+(weapon equipped)+(item equipped)+(Health)+(magic)+(location X)+(location y)+(innovatory items)+(Spells)+(money)+(etc.)
all items and spells would have a number assigned to them. so when it loads innovatory
it would know that you have items 1,3,5,6,and 9 and would look like "innovatory (1,3,5,6,9) scratch would have to be able to do "from start till ," and "from last to ,"
the only way i can think of to save now is to use a list and have it generate the same string and have the user remember it on their own.
just to make things clearer load would be a button
Last edited by rhinorulz (2010-05-13 14:10:25)
Offline
I bet that Scratch 2.0 will probably have some functionality like this, although the cookies might be tied to your Scratch username rather than put on your hard drive. They're working to make Scratch more web-oriented.
http://scratch.mit.edu/forums/viewtopic.php?id=29700
Offline