Heyo!
Want to say thanks in advance for anyone who takes some time out of there day to give me a hand, I really appreciate it. Jumping right in.
So I was wondering if there was a way to use the text input to unlock a scene. Example: In scene 4 you read a piece of paper someone wrote a password down. In scene 5 a computer asks for said password and you have to manually type it in.
Is such a thing possible? I thought it would be a nice little minigame/addon. If they failed putting in the right password so many times it would go to game over or something like that. Just wanted to see if it was possible. Thank you!
*label scene1
*input_text password
*if password = "rightpassword"
*goto scene2
*else
Wrong password, try again.
*set wrongpassword + 1
*if wrongpassword = 3
You failed to enter the right password three times, the system is now locked.
*goto scene3
*if wrongpassword <= 2
*goto scene1
Heyo!
Thanks for the reply. I’m actually a bit new with CS but have found it super intuitive so far. If and else I’m still fumbling my way around and this little snippet helped quite a bit.
I found one error with my code where it would repeat, Wrong password try again, even after getting all three attempts wrong. I fixed it, so I thought I would let you know about it before you tried using the old one.
Ah, I see it! Thanks for pointing that out, would have stumped me for a little bit. I keeping all the passwords numerical and sequentual. Such as ‘333-666’ that way you don’t end up with a bunch of case sensitive errors. Hopefully it will be a little bit of fun.
Out of curosity(if you know by chance). Could you make a *gosub and pull up the minigame from any scene(if you wanted)?
I don’t see why you couldn’t. However, if you really want to make it interesting, make it a puzzle for them. It could be something that they would have to decode to find the right number to enter.