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

#1 2012-08-19 04:42:09

SimplyMelee
Scratcher
Registered: 2012-01-14
Posts: 100+

I would like some advice on making a money menu

Hello, I'm SimplyMelee and at the moment I'm 'secretly' making a flying game which I hope to get featured. Please help me and I will give you 1% credit!

The problem is that I'm making a money variable for my game so you can buy items from the shop ,but I hate the default look of the variables. (Yes I know how to change the colours of variables.) I would like to make a sprite/ sprites which are coloured text that represent how much money I have.

If you could not understand what I said please have a look at this demonstration:
Shoot-it 2:Here

The height and position of the ball as well as the money are what I would like to know how to do.


http://oi48.tinypic.com/2czzjol.jpg

Offline

 

#2 2012-08-19 05:28:46

Zarule6
New Scratcher
Registered: 2012-08-02
Posts: 36

Re: I would like some advice on making a money menu

You could make new sprites and there costumes the numbers 1,2,3,4,5,6 etc.  if you have costume 1 name it "1" scratch will then rename it "11"(ignore it) etc. ,control them with a variable "Forever
   if Show=1
           show
   else
     hide"

example of how to display it:

when gf clicked
forever
 set (Gold_1) to <(letter 1) of (Total_Gold)>
if <(show) = [1]>
  switch to costume (Gold_1)
  show
else 
  hide

now when you want to buy something from the "shop"

when gf clicked
forever
if <(show) = [1]>
if (touching color [red]?)                                   //can be a sprite as well 
  say [This health potion costs 20 gold pieces]
 else 
  say []
end
if  (mousedown?) <and> (touching color [red]?)
  change (Total_Gold v) by [-20]
  change (HP_potion v) by [1]
  say [ you bought a Health Potion for 20 Gold Pieces]
Just an example of what you mean by the Money part,hope it helps  smile

Offline

 

#3 2012-08-19 06:06:45

SimplyMelee
Scratcher
Registered: 2012-01-14
Posts: 100+

Re: I would like some advice on making a money menu

Thanks, worked a charm!  smile


http://oi48.tinypic.com/2czzjol.jpg

Offline

 

Board footer