Discuss Scratch

turquoisetrapezoid59
Scratcher
28 posts

Variable Styles/ Custom fonts

So… you know how on some games the variables are in your own font and stuff? I tried to do my own on https://scratch.mit.edu/projects/70785594/
but it glitched and stuff.

Can anyone tell me how to make a better script?
julianandwill
Scratcher
500+ posts

Variable Styles/ Custom fonts

turquoisetrapezoid59 wrote:

So… you know how on some games the variables are in your own font and stuff? I tried to do my own on https://scratch.mit.edu/projects/70785594/
but it glitched and stuff.

Can anyone tell me how to make a better script?
Hmm… you mean something like the score in this:
https://scratch.mit.edu/projects/16743509/
This is using a sprite and using variables to control it's costumes. If this is what you're looking for, then follow these instructions:
1. Since you're using 3 numbers and 3 variables in your game, create 9 sprites, each costume with numbers 0 to 9.
2. When you're done, rename the costumes with the number they are associated with on ALL the sprites.
3. Find the coordinates you want them at at the start, and put this script on the sprites for the first number:
when green flag clicked
hide
go to x: (x) y: (y)
switch costume to [0 v]


when I receive [game-start v]
show
switch costume to (variable)
if <(variable) > [9]> then
broadcast [2nd-number v]
change x by (-10)

end
Put this on the second numbers:
when green flag clicked
hide
go to x: (number-1-x) y: (number-1-y)
switch costume to [0 v]

when I receive [2nd-number v]
show
switch costume to (variable)
if <(variable) > [99]> then
broadcast [3rd-number v]
change x by (-10)

end
Then this on the third numbers:
when green flag clicked
hide
go to x: (number-1-and-2-x) y: (number-1-and-2-y)
switch costume to [0 v]


when I receive [3rd-number v]
show
switch costume to (variable)
and vice versa…
Hope I helped!
If this is not what you were looking for, then please explain more on what you need and I can try to help.

Last edited by julianandwill (Aug. 17, 2015 04:48:46)

deck26
Scratcher
1000+ posts

Variable Styles/ Custom fonts

daemys
Scratcher
100+ posts

Variable Styles/ Custom fonts

turquoisetrapezoid59
Scratcher
28 posts

Variable Styles/ Custom fonts

Last edited by turquoisetrapezoid59 (Aug. 20, 2015 17:30:17)

turquoisetrapezoid59
Scratcher
28 posts

Variable Styles/ Custom fonts

julianandwill wrote:

turquoisetrapezoid59 wrote:

So… you know how on some games the variables are in your own font and stuff? I tried to do my own on https://scratch.mit.edu/projects/70785594/
but it glitched and stuff.

Can anyone tell me how to make a better script?
Hmm… you mean something like the score in this:
https://scratch.mit.edu/projects/16743509/
This is using a sprite and using variables to control it's costumes. If this is what you're looking for, then follow these instructions:
1. Since you're using 3 numbers and 3 variables in your game, create 9 sprites, each costume with numbers 0 to 9.
2. When you're done, rename the costumes with the number they are associated with on ALL the sprites.
3. Find the coordinates you want them at at the start, and put this script on the sprites for the first number:
when green flag clicked
hide
go to x: (x) y: (y)
switch costume to [0 v]


when I receive [game-start v]
show
switch costume to (variable)
if <(variable) > [9]> then
broadcast [2nd-number v]
change x by (-10)

end
Put this on the second numbers:
when green flag clicked
hide
go to x: (number-1-x) y: (number-1-y)
switch costume to [0 v]

when I receive [2nd-number v]
show
switch costume to (variable)
if <(variable) > [99]> then
broadcast [3rd-number v]
change x by (-10)

end
Then this on the third numbers:
when green flag clicked
hide
go to x: (number-1-and-2-x) y: (number-1-and-2-y)
switch costume to [0 v]


when I receive [3rd-number v]
show
switch costume to (variable)
Okay, so this didn't work because of clone overload the other sprites won't work.
ApolloWarlord
New Scratcher
5 posts

Variable Styles/ Custom fonts

So any way to do this on Scratch 1.4 easily?
deck26
Scratcher
1000+ posts

Variable Styles/ Custom fonts

ApolloWarlord wrote:

So any way to do this on Scratch 1.4 easily?
Do it with sprites rather than clones or use stamping if the other bits of the project allow that.
ApolloWarlord
New Scratcher
5 posts

Variable Styles/ Custom fonts

I may sound a little ‘noobish’ but what is meant by the variables x: number-1-x y: number-1-y
ApolloWarlord
New Scratcher
5 posts

Variable Styles/ Custom fonts

and that code doesn't work
ApolloWarlord
New Scratcher
5 posts

Variable Styles/ Custom fonts

I'm really stuck tryina do this can anyone help?
ApolloWarlord
New Scratcher
5 posts

Variable Styles/ Custom fonts

I figured it out now
dogs_king
Scratcher
5 posts

Variable Styles/ Custom fonts

can any one tell me i want the answer quickly please!
deck26
Scratcher
1000+ posts

Variable Styles/ Custom fonts

dogs_king wrote:

can any one tell me i want the answer quickly please!
Please create your own topic rather than necroposting. If you want a quick answer share what you have and ask a clear question.
chopedmc
Scratcher
5 posts

Variable Styles/ Custom fonts

dogs_king wrote:

can any one tell me i want the answer quickly please!
when green flag clicked
set [Number v] to [(the number of the number costume)]
when green flag clicked
forever
set [number v] to (costume #)
end

Last edited by chopedmc (Dec. 7, 2020 08:02:27)

ShubieCat_24
Scratcher
4 posts

Variable Styles/ Custom fonts

i dont know (only help i can give) D:
goldenlion06
Scratcher
500+ posts

Variable Styles/ Custom fonts

please don't necropost

Powered by DjangoBB