Hit keys to maintain status

Get help using Construct 2

Post » Tue Apr 29, 2014 9:02 pm

Hi,

Let's say I've got a character on-screen, and he's tired. If he falls asleep, I lose the game. So I place a meter on one side of the screen that says "Awake-meter," and it begins fully charged at start of layout. Once "play" begins, I want the meter to constantly try to whittle itself away to an "empty" state. I'll lose if the meter is empty, so I arrange my game so that rapidly tapping the K and M keys puts a little "juice" back into the meter. If I'm not tapping the keys, the meter keeps going down. If I am tapping the keys, I can keep the meter up.

I don't know how to do that, and any advice would be appreciated. Thanks a lot!
B
9
S
1
Posts: 10
Reputation: 529

Post » Wed Apr 30, 2014 2:39 am

Here is a way to do it:

http://www.eli0s.com/Tests/Awake-O-Metre.capx

Don't forget to add the keyboard object to your project.
composer - multimedia artist
www.eli0s.com/en/
B
69
S
27
G
6
Posts: 1,146
Reputation: 10,379

Post » Wed Apr 30, 2014 4:22 pm

Thanks for the help, this is exactly what I was looking for.
B
9
S
1
Posts: 10
Reputation: 529

Post » Wed Apr 30, 2014 4:29 pm

Glad I could help!
composer - multimedia artist
www.eli0s.com/en/
B
69
S
27
G
6
Posts: 1,146
Reputation: 10,379


Return to How do I....?

Who is online

Users browsing this forum: banquetburger and 49 guests