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

#1 2008-11-15 05:03:38

hellokitty-96
Scratcher
Registered: 2008-10-09
Posts: 15

Intentory

Hi everyone!
Ok,
This is the last Question I need answered before I have officially finish my latest best project I've made so far!
I might have a few more Q's to fix things up a little.
But anyhow I got an important Q!!!!
Ok, I've got Scratch Version 1.3 & I am making a virutal pet thing.
So When you go to the toyshop & you buy it. How do you make it so that when you buy the sprite it will appear in your intentory?
Thanks!

That should be about the LAST question I got.
I might have few more in the future but anyways I'm almost finished!  big_smile

Thanks again!

Jocelyn

Offline

 

#2 2008-11-15 08:39:03

djm111
Scratcher
Registered: 2008-10-29
Posts: 1000+

Re: Intentory

Have a variable, call it amount of whatever thing it is. Put in that when the green flag clicked, it sets the variable to 0.
Then, put in a script so  when you buy it( by clicking on it or whatever) it sets the variable to 1. Then put in the script<when green flag clicked><hide> on your item.
then put in that when the variable equalling 1, when you go into your inventory it shows up. If you use broadcaststhen put in something like:
when i receive (inventory open) or whatever you use to open the kinventory
and variable( the one you used earlier) = 1
show
I probably didn't explain very well, but hope it helps


http://i627.photobucket.com/albums/tt358/Dazzamcgazza/sig.png

Offline

 

#3 2008-11-24 16:09:11

Hunter82798
Scratcher
Registered: 2008-08-24
Posts: 8

Re: Intentory

Okay that idea ^ is really good and well,probably works better than this one but I'll post it anyway:[blocks]<when[toy  ]clicked><broadcast[ toy clicked ][/blocks]

Then have another toy in your inventory which has these 2 scripts:
[blocks]<when green flag clicked><hide><go to[ inventory ] [/blocks]

and here's the other one:
[blocks]<when I receive[ toy clicked ]<show>[/blocks]

there you go! smile

_________________________________________________________________________________
anything is possible with cookie blocks

Offline

 

Board footer