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

#1 2008-07-26 13:26:08

Bluestribute
Scratcher
Registered: 2008-01-24
Posts: 1000+

Score with Decimals

I have 1 thing holding me back in my game- the total price. I don't know how to get it to say the price. It goes into decimals (obviously), which messes up other methods because it has a costume for the decimal and a costume to clear itself because I stamp other things too, which I don't want to clear. It has 12 costumes- 1-9, than 0, and thna deciaml point and clearing itself. What formula can I use to get it to always display the right price?


http://img247.imageshack.us/img247/1204/bluestributett4.jpg
That's my PSN ID. I know tons of COD4 glitches. Add me as your friend. Oh, and get a headset

Offline

 

#2 2008-07-26 13:38:17

joeyman
Scratcher
Registered: 2008-03-28
Posts: 1000+

Re: Score with Decimals

Did you try using the round blocks by the hundredths like round money x .1?


Joeyman: On Scratch since March 28, 2008.
Over 142 projects! (And recently a Brony, and PROUD of it!)

Offline

 

#3 2008-07-26 13:39:16

Bluestribute
Scratcher
Registered: 2008-01-24
Posts: 1000+

Re: Score with Decimals

joeyman wrote:

Did you try using the round blocks by the hundredths like round money x .1?

It won't work just rounding it. Just a regular one takes complicated scripts, but I imagine with a decimal and cover, it would take even more complicated scripts


http://img247.imageshack.us/img247/1204/bluestributett4.jpg
That's my PSN ID. I know tons of COD4 glitches. Add me as your friend. Oh, and get a headset

Offline

 

#4 2008-07-26 22:43:50

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

Re: Score with Decimals

Bluestribute wrote:

I have 1 thing holding me back in my game- the total price. I don't know how to get it to say the price. It goes into decimals (obviously), which messes up other methods because it has a costume for the decimal and a costume to clear itself because I stamp other things too, which I don't want to clear. It has 12 costumes- 1-9, than 0, and thna deciaml point and clearing itself. What formula can I use to get it to always display the right price?

So, you are using a stamping routine to do the decimal number?  And that isn't working because you need to clear for other reasons?  What if you had a sprite for each digit (and one costume that matched the background)?  Then, you could just work out the code to set each sprite to the right costume.  You would have custom number formating without stamping.


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

Offline

 

#5 2008-07-26 22:49:17

Bluestribute
Scratcher
Registered: 2008-01-24
Posts: 1000+

Re: Score with Decimals

Paddle2See wrote:

Bluestribute wrote:

I have 1 thing holding me back in my game- the total price. I don't know how to get it to say the price. It goes into decimals (obviously), which messes up other methods because it has a costume for the decimal and a costume to clear itself because I stamp other things too, which I don't want to clear. It has 12 costumes- 1-9, than 0, and thna deciaml point and clearing itself. What formula can I use to get it to always display the right price?

So, you are using a stamping routine to do the decimal number?  And that isn't working because you need to clear for other reasons?  What if you had a sprite for each digit (and one costume that matched the background)?  Then, you could just work out the code to set each sprite to the right costume.  You would have custom number formating without stamping.

Yeah, I might (and will) have ti try that since it isn't working so far.


http://img247.imageshack.us/img247/1204/bluestributett4.jpg
That's my PSN ID. I know tons of COD4 glitches. Add me as your friend. Oh, and get a headset

Offline

 

Board footer