Creating point-and-click escape the room game

0 favourites
  • 12 posts
From the Asset Store
Connect the dots in the correct order and draw happy animals!
  • Hi. I'm new to Construct and am trying to create a point and click escape the room game. I've read another thread explaining how to use a non visible sprite and applying a variable instance to each time that sprite clicked. I get the idea but am having a hard time figuring out how to properly add the instance in the events sheet. When I try all invisible hotspots yeild the same action rather than being unique. Any help and examples is appreciated. Thanks.

  • Hiya, could you link the thread as I don't have any context. What are invisible sprites for?

  • Hi Lions, the thread I'm referring to is here: construct.net/en/forum/construct-2/how-do-i-18/clickable-hotspots-56802.

    I'm trying to make an escape game similar to ones found on this site: 365escape.com/Scary-Games.html.

    Basically, I need to create hotspots on which the player can click on to activate a puzzle or pick up an item.

    I get the concept of using invisible sprites to create the hotspots and using instance variables to make each unique (but using the same sprite). That said, I can't get it to work right in the event sheet. I might be sequencing it wrong in the sheet, I'm not sure.

    Thanks for your reply.

  • Ah I see. Should be fairly simple. You give each clickable area an ID which is the instance variable. Events in the sheet look like 'on object clicked (clickable sprite)' with condition 'sprite.variable=num' then you do this for each sprite in the game. On the right are the actions to perform when you click that sprite so pop up a window or text.

    If you still can't work it out send a screenshot of the event sheet you've done and where it's gone wrong.

  • Thank you, Lion's. That cleared things up and it worked! I'm still learning the program and am sure I will have more questions. I appreciate the help here.

  • Great, good luck! :)

  • Hi there, I have another question. I'm trying to create an event in which if a character is clicked, it will generate some text, and when the text is clicked, it goes away. This is correct.

    What I need to figure out is how to make it so that when the character is clicked, the text generates once for that instance - however, the user should be able to click the character again next time and the same text reappears. Does that make sense? Right now, clicking on the character while the text is still on screen generates the same text over the existing text. You can tell that the text layer is piling up over each other every time the character is clicked.

    In addition, I also want to learn how to make it so that when an object is clicked, it will drop an inventory item for that one time, and when the user clicks the same spot next time, it will no longer be functional (since the object has already been obtained).

    I've tried using the "Trigger once while true" function but it doesn't work.

    Thanks in advance for any advice!

  • Well I guess the first bit is that you need to destroy the text after some time, maybe put it on a timer? Or depending you could have on clicked instance, destroy text and then create it so you only ever see one.

    Trigger once won't work for the second bit because object clicked is already trigger once. You have to lock out the instance as 'used' and you do this with a variable. Variable is set to false, when you click the instance you set it to true, and on the left you add a condition only if variable is false.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Hi Lions, thanks again. I tried the timer on text option and it's okay if all else fails. I am interested in your suggestion "Or depending you could have on clicked instance, destroy text and then create it so you only ever see one". Can you provide a bit more detail on how I would set this up?

    Would this solution for setting up the character sprite so it only activates the text once if the sprite is clicked on?

    Thanks!

  • If you can provide some guidance on your direction regarding variables as well, it would be greatly appreciated. Not sure if you can provide a screen shot of a mock event sheet if possible.

    "Trigger once won't work for the second bit because object clicked is already trigger once. You have to lock out the instance as 'used' and you do this with a variable. Variable is set to false, when you click the instance you set it to true, and on the left you add a condition only if variable is false."

  • And another question regarding the "used" variable - how would I make it so once the object is clicked, and inventory item dropped, it can't be triggered for the duration of the game? Right now, I have a local variable that seems to work but when I leave the "room" (layout), and return to it, it resets and the object can still be clicked and inventory item still there. Thanks.

  • Ok for the last question that's interesting, umm you can give the object Persist behaviour that means between layouts it keeps the same variable setting. The second question, it sounds like you are doing it correctly just it was resetting. First question, it depends what you want the text to actually do. You can have it spawn, then fade out with a fade behaviour. The first question, is that relevant now, if you can only click it once ever then it should destroy the text and then when you click i guess nothing happens.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)