Discuss Scratch
- Discussion Forums
- » Help with Scripts
- » How do you create custom variables?
- fluffy0006
-
25 posts
How do you create custom variables?
I've been getting annoyed with the ugly looking normal variables, can you reply to this with the ways you create your own variables that look good.
when green flag clicked
forever
annoyed with variables
end
Last edited by fluffy0006 (June 25, 2020 15:49:25)
- fluffy0006
-
25 posts
How do you create custom variables?
AAAAAARRRRRGGGGHHHH!!!! Custom variables are so annoying to make!!!
when green flag clicked
forever
Annoyed
end
- fluffy0006
-
25 posts
How do you create custom variables?
when I receive [start of life v]
forever
annoyed with variables arggghh
end
- Fluffyman006
-
4 posts
How do you create custom variables?
when I receive [start of eternity v]
forever
bacon
end
- qucchia
-
100+ posts
How do you create custom variables?
What do you mean by “custom variables”? Do you mean to change how they are displayed on the screen? If so, what variable are you trying to customise?
- fluffy0006
-
25 posts
How do you create custom variables?
Yes, I mean changing the way the are displayed. What do you mean by “custom variables”? Do you mean to change how they are displayed on the screen? If so, what variable are you trying to customise?
- qucchia
-
100+ posts
How do you create custom variables?
Is the variable displaying a number or some text?
- fluffy0006
-
25 posts
How do you create custom variables?
Text Is the variable displaying a number or some text?
- qucchia
-
100+ posts
How do you create custom variables?
You can use a pen text engine to draw the text. You can choose font, colour, size, and more. Here's an example of a pen text engine
- fluffy0006
-
25 posts
How do you create custom variables?
Here's an example of a pen text engineOh, sorry I meant numbers, I'm tired. You can use a pen text engine to draw the text. You can choose font, colour, size, and more.
- Wyan100
-
1000+ posts
How do you create custom variables?
Okay so here we have to options:
1. You can right-click the variable on screen and select a different display
2. You can make a text engine
If you want to make a text engine then take a sprite with a costume for each letter of the alphabet (make sure all the costumes are named there respective letter), then use a code something like this:
Of course the coding is slightly different in every project, but this is the basic idea.
Edit: My First Ninja'd
1. You can right-click the variable on screen and select a different display
2. You can make a text engine
If you want to make a text engine then take a sprite with a costume for each letter of the alphabet (make sure all the costumes are named there respective letter), then use a code something like this:
define write (Text) at (Ypos.)
broadcast [Clean up v] // Whether this has screen refresh or not will effect whether the text appears immediately or is slowly spelled out on screen
set [Counter v] to [1]
go to x: (-150) y: (Ypos.)
repeat (length of (Text))
if <(letter (Counter) of (Text)) = [ ]> then // This empty square represents a space
change x by (20)
else
switch costume to (letter (Counter) of (Text))
create clone of [myself v]
change x by (10)
end
change [Counter v] by (1)
end
when I receive [Clean up v]
delete this clone
when I start as a clone
show
play sound [Tap v] until done // Remove this if you want the typing to be silent
Of course the coding is slightly different in every project, but this is the basic idea.
Edit: My First Ninja'd
Last edited by Wyan100 (June 25, 2020 16:24:53)
- fluffy0006
-
25 posts
How do you create custom variables?
Thnx Okay so here we have to options:
1. You can right-click the variable on screen and select a different display
2. You can make a text engine
If you want to make a text engine then take a sprite with a costume for each letter of the alphabet (make sure all the costumes are named there respective letter), then use a code something like this:define write (Text) at (Ypos.)
broadcast [Clean up v] // Whether this has screen refresh or not will effect whether the text appears immediately or is slowly spelled out on screen
set [Counter v] to [1]
go to x: (-150) y: (Ypos.)
repeat (length of (Text))
if <(letter (Counter) of (Text)) = [ ]> then // This empty square represents a space
change x by (20)
else
switch costume to (letter (Counter) of (Text))
create clone of [myself v]
change x by (10)
end
change [Counter v] by (1)
endwhen I receive [Clean up v]
delete this clonewhen I start as a clone
show
play sound [Tap v] until done // Remove this if you want the typing to be silent
Of course the coding is slightly different in every project, but this is the basic idea.
Edit: My First Ninja'd
- Jbear_
-
1000+ posts
How do you create custom variables?
hello im from 2021
Please don’t necro post. This post was a few months ago and you posting on a old, irrelevant topic is not necessary
- Discussion Forums
- » Help with Scripts
-
» How do you create custom variables?