Discuss Scratch

rhymesongandshlong
Scratcher
17 posts

Secret Code Typing

I want to make secret codes that you can type into a screen on scratch, but I can't figure out how to make an area to type in to change a variable!
NMario84
Scratcher
1000+ posts

Secret Code Typing

Depends how you want to achieve this. Do you want the player to type the code in using an Ask block, like a secret phrase? Or do you want like a Konami Code type of scenario?

If it's a Konami Code scenario, then you can do this with a list. Set up what each input you want to be on each section of the list. For example, 1.up, 2.right, 3.down. etc. Then set a variable to 1, this variable will tell you which key press you want to input next. So if the variable is 1, and the user presses up, add 1 to this variable, and so on for 2, and 3 of the said list. If they input an incorrect key, reset the variable back to 1.

Last edited by NMario84 (Sept. 12, 2024 19:59:49)

deking0911
Scratcher
65 posts

Secret Code Typing

rhymesongandshlong wrote:

I want to make secret codes that you can type into a screen on scratch, but I can't figure out how to make an area to type in to change a variable!
when green flag clicked
ask [CODE?] and wait
if <<[(answer)] = [example]>> then
set [yes?] to [YES]


else

stop [ all]
end
rhymesongandshlong
Scratcher
17 posts

Secret Code Typing

deking0911 wrote:

rhymesongandshlong wrote:

I want to make secret codes that you can type into a screen on scratch, but I can't figure out how to make an area to type in to change a variable!
when green flag clicked
ask [CODE?] and wait
if <<[(answer)] = [example]>> then
set [yes?] to [YES]


else

stop [ all]
end
THANK YOU
deking0911
Scratcher
65 posts

Secret Code Typing

rhymesongandshlong wrote:

deking0911 wrote:

rhymesongandshlong wrote:

I want to make secret codes that you can type into a screen on scratch, but I can't figure out how to make an area to type in to change a variable!
when green flag clicked
ask [CODE?] and wait
if <<[(answer)] = [example]>> then
set [yes?] to [YES]


else

stop [ all]
end
THANK YOU
np
dinoman11111
Scratcher
1 post

Secret Code Typing

yo this helped out a lot tysm
Scyth3d
Scratcher
500+ posts

Secret Code Typing

Im glad you figured it out, but please don’t necropost

Powered by DjangoBB