How do I Button with timer door

0 favourites
  • 6 posts
From the Asset Store
The package contains 105 sounds This sound library is perfect for voicing mechanical doors in your Sci-Fi game.
  • Hello everyone! as I make a button that opens a door, and after a few seconds the door closed again, the problem that I have is the timer dont respect always the time assigned to him,and I dont know how to do it.the problem is that I'm pretty noob and i think what I'm doing this all wrong.

    Thanks!!

  • The problem here in lies that your giving not enough time for it to be feasible for the player object to move past the door so when the timer runs out while the player is still on the door it is getting the door and player wedged together, so what you need to do is increase the time if collisions are disabled while the player is still colliding with the door so what you need is a variable to perform a switch statement to 0.5 the collisions by halving them so you can check that necessary check, turn it on and off when needed in the appropriate events.

    Sorry if I haven't been using paragraphs...

  • Try using a Timer behaviour on each object. You might need an instance variable IsActivated as well, that is True when Player activates the lever, and False again when its timer goes off. Then check: IsActivated{inverted} AND Is overlapping AND Trigger once. Something like that.

  • Thank you very much for answering, II'll try something new to see if it works.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Glad to help unlike others here... Yes you know who you are...

  • truefalcon Glad to help unlike others here... Yes you know who you are...

    what do you mean by that? Do we just muck about or has someone not helped you? just you answered this time no need for you to go that far. your name is noted in future you ask and you get same answer Glad to help unlike others here... Yes you know who you are...

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