Lock picking puzzle - cursor below an object

  • #1, by blablo_101Thursday, 26. April 2018, 11:43 6 years ago
    Hi,
    I was thinking about making a minigame  about forcing a lock... So I need to control a lock pick inside a lock. 
    I have no idea wich is the better way to do it. I have create a new cursor (an really big image of a hand holding the lock pick). But the cursor is always above the lock... 

    I have attached two images: First one is the effect I want to achieve. The seccond one is my failed attempt...

    Any ideas? : )

    Newbie

    70 Posts


  • #2, by afrlmeThursday, 26. April 2018, 11:58 6 years ago
    create it as a character. split the lock image into multiple images so that you can apply the right object center to each piece to determine if the pin should be drawn in front of or behind. You can use a Lua loop to force the character position to the cursor position & also include if queries to prevent it from 100% following the cursor position all over the screen. If you wanted you could lock the character so it only follows the x position of the cursor.

    Imperator

    7278 Posts

  • #3, by blablo_101Thursday, 26. April 2018, 13:23 6 years ago
    Mmm
    I really doesn't know much about lua... Is there any documentation or lua example to look at?

    If the only way to resolve my puzzle is with "out of my reach" lua, I can redo my minigame and try a simpler approach : )

    Newbie

    70 Posts

  • #4, by afrlmeThursday, 26. April 2018, 13:47 6 years ago
    I can't really think of a none Lua approach with it unless you were to change it to a QTE (quick time event) or something along those lines where the player has to click certain spots on the scene or press the specified keyboard button within x time, etc. That way you could just create it all as an animation that reacts to the mini-game. You could get away without using Lua script that way.

    If you want the player to be able to manually control the hand then various things would have to be done including the use of Lua script to control the hand which would need to be created as a character or scene object so that images/animations in the scene can be correctly drawn on top of or behind it.

    Imperator

    7278 Posts

  • #5, by blablo_101Thursday, 26. April 2018, 17:37 6 years ago
    I`m going to follow your advice.
    I have insert the hand as a character and I`m going to move the lock-pick with clicks (As QTE but with no time). 
    I`m going to combine all of this with some animations... This way I can make the scene more dynamic...
    Thank you!

    Newbie

    70 Posts

  • #6, by afrlmeThursday, 26. April 2018, 17:38 6 years ago
    No problem mate. Good luck. smile

    Imperator

    7278 Posts