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

#1 2011-08-17 16:05:28

trekkie2000
Scratcher
Registered: 2009-02-15
Posts: 100+

Specifying number types

Hey scratch team, often I find myself needing sliders or number generators to include decimal points. The problem is that to do that you have to set the min or max to like, 10.1 or 9.9 and several things can go wrong in that. Im encourntering a problem with a dungeon crawler Im making because of this. What if you could make an extra option that would allow you to  set the min and maxs to whole numbers, but you could, say, right click the block and click "Use only whole numbers" or "Include decimals" or something. It would sure help! Thanks  big_smile


"If life gives you lemons, sell lemonade for $.25...
...Sell antidote to poison in lemonade for $250" -Me

Offline

 

#2 2011-08-17 16:10:46

laptop97
Scratcher
Registered: 2011-06-27
Posts: 1000+

Re: Specifying number types

Good idea, you could also do this instead:

Set [Variable] to (pick random 1 to 10.1)
If <Variable > 10>
Repeat Until <Not<Variable > 10 >
  Set [Variable] to (pick random 1 to 10.1)
//Rest of Script

Offline

 

Board footer