Forum rules - please read before posting.

Making a door open after delivering several items

Hi, I have a scene where the player needs to bring 6 keys to the door, in order to open it. So far I have made it so, when the player place the keys on the door, a light will light up for each key and the key will be removed from their inventory. I was wondering how I would make it so, when all the keys have been placed on the door, that an Action will start and make the door open.

Thanks in advance.

Comments

  • I am not an expert by any means, but this seems pretty straight forward using a variable and incrementing it as the keys are placed. Then once the variable equals 6, play the animation.
    I have uploaded an image of what the **ActionList ** _might _ look like and also a video showing how I use a timer to trigger an **ActionList ** to animate my vault door.

    Image : https://imgur.com/gallery/XgPCjwg

    Video :

    Hope this might help.

    Unity version: 2021.3.21f1
    AC version: 1.78.3

  • Yes, an Integer variable to keep track of how many keys you've given it would be the way to go.

    As you likely wouldn't need to keep track of this in other scenes, you could rely on a Component variable instead of a Global one, as this'll help keep your Variables Manager de-cluttered.

    To do this, use the Scene Manager to create a new Variables object, and parent it to your door. Then, in your Variable: Set / Variable: Check Actions (as shown by @CamperJohn), set the Source field to Component and select the Variables object you created.

    A few simple puzzle examples along these lines can be found in the "Puzzle template: Simple examples" package over on the Downloads page.

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.