DE EN FR ES IT CZ
Back Back to top

How to implement a simple open door with control panel puzzle?

This thread is a few years old. Some details may refer to an earlier version of Visionaire Studio. Current tutorials

  • #1, by mutajon 10 years ago Quote
    Hey,

    I'm very new, watched a bunch of tutorials and started playing with the program. Got my head around setting up scenes, characters, items and objects and using actions.

    I want to have a locked door with a control panel on the side.
    If the player clicks the panel a zoomed in pop-up opens (similar to pic) where he can enter a code (or close the pop-up if he doesn't have the code yet).

    Is this something complicated to implement? What would be the simplest approach to achieve this (preferably without coding)?

    Thanks!


  • New to Visionaire Studio?

    Create point and click adventures without coding. The free version covers up to 25 scenes per project. For more scenes or to earn money with your game, you need a license.

    See the Indie Bundle Try it for free
  • #2, by ke4 10 years ago Quote
    Hi,

    this is not hard to implement. You will need one value for storing the information. Let's say it's a value called password.
    Wou would create each button as an object and under every button you would have action adding the current character to the value's string.

    Values["password"].String = Values["password"].String .. character

    On the delete button you would remove the last character

    Values["password"].String = string.sub(Values["password"].String, 1, -2)

    And on the cancel you would clear the whole value

    Values["password"].String = ""

    Then whenever you need it you just compare the value with your password

    if Values["password"].String == "4587" then
      startAction("Scenes[scene_name].SceneActions[action_name]")
    end

    You also need to figure out displaying the numbers. You could probably use four 10frames animations. Each frame a number from 0 to 9. You could set the current displayed frame based on the pressed button and basedon the number of characters in the string. 2 characters means second slot - second animation.

    ActiveAnimation["slot01"].FirstFrame = 2
    ActiveAnimation["slot01"].LastFrame = 2

    I suppose you could achieve it without coding either but it's just simpler to use the code.
  • #3, by mutajon 10 years ago Quote
    Thanks for the detailed response!
    I'll have to see if I can manage the code thing, and excatly how to integrate the code to the object (didn't get into it at all yet).

    Also, how would I go about displaying the zoomed view of the control panel? Is it easiest to just create it as a seperate scene? Or will a small pop-up window will be simpler to implement (via hide/show actions or something).
  • #4, by sebastian 10 years ago Quote
    you could either create a new scene (menu) or creating an interface which you can show/hide via action part
  • #5, by ke4 10 years ago Quote
    Depends on what you want it to look like. The easiet way is to create a new scene for that.
  • #6, by mutajon 10 years ago Quote
    Ok. I'll try it all out and see what I come up with.
    Thanks!