Hi, everybody!
Today I wanted to make the coded lock for a door on one of levels and I understood that I don't feel free in this case. I understand that has to use variables, but not absolutely understand how. Good tutorial about coded locks and computers may be will helpful.
If someone did something similar, help please.
Thank You!
Comments
I created a variable and set it to 0. Then I created a keypad and put clickable hotspots over each number.
Now lets say the code was 123
If the player clicks on number 1 while the variable = 0 then it adds 1 to the variable. If the player clicks on number 2 while the variable = 1 then it adds 1 again to the variable and so on until the variable = 3 and it unlocks the door. But if the player pushes a number in the wrong order it sets the variable back to 0, resetting the combination.
I'm not sure how you would do that in adventure creator because I haven't gotten that far yet. Sorry I'm not a pro but hopefully someone here will provide you with a better answer.
Following on from @cyborgrabbit's advice, you can then use the Variable: Check and Variable: Set Actions to manipulate the Variable after each click. You can also hide/show elements that represent the "pressed" state of the buttons. If the wrong code is entered, you can do all the resetting in another ActionList asset, that is shared by the others.
I suggest starting by creating a new "Lock" menu, adding the buttons and playing with ActionLists. I agree that a tutorial would be handy, but this should get you started in the meantime.