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

#1 2008-04-10 22:31:29

awsomemaster
Scratcher
Registered: 2008-04-10
Posts: 83

how to make money that can't be used in the -.

how can you make it to where if your "money" is 0 to make it not let you do stuff that needs "money". but how??????


scar the REAL 3d fps we've all been waiting for

Offline

 

#2 2008-04-10 22:32:35

awsomemaster
Scratcher
Registered: 2008-04-10
Posts: 83

Re: how to make money that can't be used in the -.

its so confuseing how can i make it like that?


scar the REAL 3d fps we've all been waiting for

Offline

 

#3 2008-04-11 04:35:13

Paddle2See
Scratch Team
Registered: 2007-10-27
Posts: 1000+

Re: how to make money that can't be used in the -.

Assuming that you have Money as a variable, then you need to test the amount of money before you let them do stuff.  In the example below, it costs 2 units of money to get into the Movie Theater so I test Money to see if it is at least 2 and charge them 2 to get in.  Then, I use a broadcast to tell some other sprites to get set up for watching the movie.

[blocks]
<if> <(  money  <>> 1.99 )>
<say[ Welcome to the Movie Theater! ]for( 2 )secs>
<change{  money }by( -2
<broadcast[ Watch the Movie
<else>
<say[ I'm Sorry, You don't have enough money! ]for( 2 )secs>
<end>
[/blocks]

Last edited by Paddle2See (2008-04-11 04:36:13)


http://i39.tinypic.com/2nav6o7.gif

Offline

 

#4 2008-04-11 04:54:40

Toasty
Scratcher
Registered: 2007-07-01
Posts: 500+

Re: how to make money that can't be used in the -.

Yep that pretty much covers it


http://i44.tinypic.com/263wpxe.png
Lovin' Toast

Offline

 

#5 2008-04-11 12:28:38

coolstuff
Community Moderator
Registered: 2008-03-06
Posts: 1000+

Re: how to make money that can't be used in the -.

Yeah...

Offline

 

#6 2008-04-11 13:06:35

Jman720
Scratcher
Registered: 2007-11-27
Posts: 1000+

Re: how to make money that can't be used in the -.

Er......Yup!


Solve for x
2+3+2+(-9)+1x+2x=7

Offline

 

Board footer