Jump to content
KChasm

How to program a "put the correct items in the correct receptacles" puzzle?

Recommended Posts

I'm working on programming a puzzle to use in this game I'm making, and while I think I know how to do the programming, what I have in mind seems somewhat complicated to the extent that I don't know if I actually know or if there's some much simpler way I'm missing entirely.

 

The puzzle is this:

 

The player character has four key items: Item A, Item B, Item C, and Item D. There are four receptacles in a room, Frame W, Frame X, Frame Y, and Frame Z.

 

By facing Frame W and selecting Item A from the menu, the player is given the choice to place Item A in Frame W (I believe this particular part of the programming can be accomplished through common events, but I can't be sure if it's the best way to do it). If the player inspects Frame W with Item A in it, they are given the choice to remove Item A from Frame W, which will, of course, also return Item A to the player character's key items.

 

Of course, this should work with any of the Items and any of the Frames.

 

Nearby is a button. If the button is activated when the correct Items are in the correct Frames, a door will open. Otherwise, the player character will be damaged (frankly, this is the part I expect to be the easiest to program. I'm guessing I can just have a specific variable be set when an Item goes into a Frame, and the result of the button being pressed will depend on whether the combination of variables as they are currently set are the right ones, but again, I don't know if it's the best way to do it).

 

Any tips or tricks? Thanks.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×