How do I interact with objects?

0 favourites
  • 3 posts
From the Asset Store
Welcome! I-Spy (Hidden objects) is an educational puzzle that is more than just seek-and-find activities.
  • For example, if there's a door, how do I show the text "Press E" when the player is near it and make it so that when the player press E, they change locations? Or any other objects, really, like an item that needs to be picked up, or something.

  • You can use Line of Sight behavior to check when the object is in sight or near another object. If you want "E" key to work only when the character is near the door, create an event with two conditions:

    Keyboard on E pressed
    Player has LineOfSight to door
    

    It's also possible to use overlapping or collision checks, for example "Overlapping at offset".

    I suggest studying example projects and games included in Construct.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You can use Line of Sight behavior to check when the object is in sight or near another object. If you want "E" key to work only when the character is near the door, create an event with two conditions:

    > Keyboard on E pressed
    Player has LineOfSight to door
    

    It's also possible to use overlapping or collision checks, for example "Overlapping at offset".

    I suggest studying example projects and games included in Construct.

    Thank you, this actually helped me do what I had in mind!

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