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

#1 2012-08-11 22:11:09

GoldTube
New Scratcher
Registered: 2012-08-07
Posts: 83

How to stamp score

I need to know how do I stamp score.

I need it for a calculator I'm making, Equator.

Offline

 

#2 2012-08-11 22:30:20

Wes64
Scratcher
Registered: 2011-08-19
Posts: 1000+

Re: How to stamp score

make a sprite with number costumes in this order
1,2,3,4,5,6,7,8,9,0
use this script

set [counter v] to (1)
repeat (length of (score))
switch to costume (letter (counter) of (score))
stamp
change X by (whatever the width of the letter is)
change [counter v] by (1)
the complicated way
name the costumes this instead.
1c,2c,3c,4c,5c,6c,7c,8c,9c,0c,
then make a costume " c" which is a space and the letter c
set [output v] to (join (score) [ ]) // join the score with a space
set [counter v] to (1)
switch to costume (join (letter (counter) of (output)) [c]) //copy
stamp //these
change X by (whatever the width of the letter is) //blocks
change [counter v] by (1) //!!!
copy the "copy these blocks!!!" blocks the maximum expected length of your score. (Say your score will always be less then 1000. that means the length will always be less than 4. so you would copy those blocks 3 times)

Last edited by Wes64 (2012-08-11 22:35:25)


Experienced 2.0 Tester: Ask me questions!
Using Firefox 13.0, Flash plugin version 11.4.402.287, and Windows XP Professional.

Offline

 

Board footer