How do you make a how to play button

requests
questions
tagica
answered

#1

Can any one help my with making a how to play button and then come up with instructions


#2

I can help! It’s not hard. Are you new to Hopscotch?
Here’s the code.
When (How to play) is tapped
Set text to (your instructions here)
End


#3

If you want the text to hide when you press a certain button, you should use values and Check if else blocks. If that is what you want, type @William04GamerA in a reply and I will make a short tutorial!


#4

While usually I’d recommend using a tutorial at the beginning of playing the game, that’s more time consuming to make than a simple wall of text. Here’s a quick tutorial on how to make it.




This prepares the button. It’s all cosmetic changes and doesn’t affect the project, but it makes it look better.
The first block sets position to the top middle of the screen.
The second block changes it from a sloth to some text.



This code which also goes in the button object is run when the object is tapped.
The first block is a check if else block. It checks whether or not the text that we want to display is visible.

How do check if else block sets work?

Check if else block sets have two containers for code, and one conditional parameter. If the paremeter is true, the code in the first container runs. If it evaluates to false, the code in the second container runs.

How does invisibility work?

Invisibility is a percent, which means that invisibility 0 is completely visible, and invisibility 100 is completely invisible. Anything between that is partially invisible.

If the text is invisible (which you will later see it is set to invisible at the start), the button will change into a back button, which will be displayed to the user by changing text. If the button already is a back button, it will change back to what it was before.



Moving on to the text we want, here is the setup code.
The first block is pretty self explanatory. It is one of the default custom methods in every new Hopscotch project.
The second block sets text to whatever you want the hidden text to be (in my case, “I like Oreos”.)
The third block makes the object invisible. This is used in the button’s code and the “Text display” custom rule. Speaking of which, let’s check that out now.



Look familiar? It’s the same basic idea as the rule which changes the button’s text. When button is tapped, check is object is invisible. If it is, display the object. If it isn’t, hide the object. Understand? Good.




This is the result.



Let me know if there’s anything you didn’t understand, and I’ll explain it to you.


#5

NO I have lots of games and I’m very experienced
I was just wondering