How do I Button with timer door

Get help using Construct 2

Post » Fri Oct 24, 2014 10:04 am

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!!
You do not have the required permissions to view the files attached to this post.
B
4
Posts: 2
Reputation: 204

Post » Fri Oct 24, 2014 10:28 am

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...
B
8
S
2
Posts: 134
Reputation: 1,001

Post » Fri Oct 24, 2014 10:31 am

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.
B
24
S
9
G
4
Posts: 1,646
Reputation: 6,596

Post » Fri Oct 24, 2014 10:37 am

Thank you very much for answering, II'll try something new to see if it works.
B
4
Posts: 2
Reputation: 204

Post » Fri Oct 24, 2014 10:39 am

Glad to help unlike others here... Yes you know who you are...
B
8
S
2
Posts: 134
Reputation: 1,001

Post » Fri Oct 24, 2014 11:18 am

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...
B
250
S
39
G
15
Posts: 1,953
Reputation: 40,623


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 54 guests