Page 1 of 1

Progress Bar in Lock picking

PostPosted: Thu Apr 06, 2017 1:16 pm
by SpottyFalcon
Hi, I started a couple of weeks ago and am making a stealth/thief game.

I'm trying to use the progress bar to show lock picking in progress, but when the "E" button is released it resets if not finished.

The desired effect is achieved, the door opens after 3 seconds of "E" being held down, but the bar flashes in and out of existence not progress and finally diassapearing after the 3 seconds time out. If there is a non-complicated solution to this please tell me, I would appreciate it.

Re: Progress Bar in Lock picking

PostPosted: Thu Apr 06, 2017 2:28 pm
by oosyrag
Use a timer behavior. Start on each key pressed, stop and reset on e key released. On timer completed, success.

Use timer expressions to represent the time remaining if you want.

Re: Progress Bar in Lock picking

PostPosted: Thu Apr 06, 2017 4:05 pm
by SpottyFalcon
What event do I need to use to make the timer reset?

Re: Progress Bar in Lock picking

PostPosted: Thu Apr 06, 2017 4:12 pm
by oosyrag
Reset happens implicitly - if you stop the timer, it won't trigger the on timer condition. When you start the timer, it will be at whatever time you set it for.

Re: Progress Bar in Lock picking

PostPosted: Thu Apr 06, 2017 4:19 pm
by SpottyFalcon
Thanks