So upon entering the right combination it would set a boolean to true, allowing the player to enter the next area. I've seen some other ways to do a door key code, with using textfields and a variable "stringToEdit" but it doesn't really suit how my game plays.
Any help would be greatly appreciated.
Answer by Xtro
Aug 07, 2013 at 02:11 PM
Pass = "3462"
CorrectCount = 0
Succeed = false
Key = Get pressed key
if Key = Pass[CorrectCount] CorrectCount
Were you able to test this ?
Sorry, my PSU blew and I've not been able to get to a computer until now. I'm unsure how to go about converting this to java
I'm sorry to say that but if you can't convert a simple algorithm into your programming language, you shouldn't be developing a game. You should be practicing your programming skills first. Please don't take me wrong. I'm just suggesting for your good.
Yeah, I get you. Just trying to learn as I go I guess. Since I generally just make the environments, not aiming to be a programmer really. Just need some basics to make a small interactive environment.
hmm I see. You are right.
Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.
The best place to ask and answer questions about development with Unity.
To help users navigate the site we have posted a site navigation guide.
If you are a new user to Unity Answers, check out our FAQ for more information.
Make sure to check out our Knowledge Base for commonly asked Unity questions.
If you are a moderator, see our Moderator Guidelines page.
We are making improvements to UA, see the list of changes.
Answers and Comments
16 People are following this question.
How to make trigger play animation only once?
Script for collectiong keys to escape
Key Item in C#
How to instantiate a prefab after a certain action happened?