This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2010-05-13 13:43:09

rhinorulz
Scratcher
Registered: 2010-04-18
Posts: 13

Cookies

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

 

#2 2010-05-13 20:27:18

fullmoon
Retired Community Moderator
Registered: 2007-06-04
Posts: 1000+

Re: Cookies

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


http://i302.photobucket.com/albums/nn100/fullmoon32/wow.jpg

Offline

 

Board footer