Forum rules - please read before posting.

Need help with coded lock

edited July 2014 in Engine development
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

  • edited July 2014
    I haven't done it in Adventure Creator yet but I did make a coded lock using variables in adventure game studio a while ago.

    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.
  • In AC, this would likely be done with Menu Buttons, rather than Hotspots.  You can link button clicks to ActionList assets by setting the "Click type" to "Run ActionList".

    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.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.