How Do I Use Values?

hopscotch
values
howtos

#1

How to use values?



#2

If you are making a quiz or a game, you can set value Example to 5, and when Example = 5, do whatever


#3

When I publish The Aptitude Test, it has values in play, so you can check the code and see :wink:


#4

Thanks for replying PopTart0219


#5

Values are like a message that can be used for multiple things. Values can be sent. For example.
When Play Button is Tapped
Set Value (Value ) to 1

When (Value)=1
Change Y by 100


#6

Values (or variables) are essentially numbers that are assigned to words. To access the number, you call it using the word that it has the number assigned to it.
For example: myAge would be the name of the value. You would use this word to call it. When you call the value, it will return a number, which is the number that it holds. This number could be anything from 6 to 1000006.
Value are useful for various different things. They can be used to check if the player has done something or not.
For example, you could have finished set to 0 (0 means false, and 1 means true). When the player clicks on something that you want them to (like a button), the button could then call the value finished and increase the number by 1, or set the number to 1.
As projects get more complicated, values will become more and more useful. Hope this helps!


#7

What do you want to know about values?


#8

Here's a quick little hopscotch that explains it: https://c.gethopscotch.com/p/xr78eyyjl


#9

Thanks for showing me how to use values