playMaker

Author Topic: Countdown Timer (custom and official) 5 second warning  (Read 2897 times)

OddButAwesome

  • Playmaker Newbie
  • *
  • Posts: 49
    • Odd but Awesome Apps on Playstore
Countdown Timer (custom and official) 5 second warning
« on: March 03, 2017, 12:45:31 AM »
Hi all,

Just having some issues with creating a countdown timer for a game.

I thought it was all good and working until I tried making the last 5 seconds turn red and pulse (punch scale) every second to alert the player of impending doom.

The game has pickups which can add to the time as well as mobs which can take away time.

The 3 screencaps are my current setup. The green states are all working well and good as they should. I know that the only thing keeping things 'real time' is the per second check box in the FloatSubtract state.

My issue is that a few things happen when I add the blue states (warning <5seconds) - the time pulses at 5 and 4 correctly but then stops counting down (i.e. is stuck at 4 seconds display). The sound file instead of a beep per 1 second goes brrrrrrrrrr. Which I am guessing is every frame? The timer is still counting down (milliseconds but a lot slower than per second).

Is the punch scale time somehow messing with the float subtract per second clock?

I have also tried DJDinos CountdownTimer which works fantastic if it was just a countdown, but I can't seem to alter the timer on the fly (adding / subtracting as time counts down). So with this - countdown works, beeping, red and pulsing at 5,4,3,2,1, but can't seem to add/subtract pickup/mob time on the fly.


So in summary I am trying to create a countdown timer that can be added and subtracted to on the fly and at the last 5 seconds go red, beep and punch scale. The user is able to gather pickups to re-go above 5 seconds returning to a non pulse and blue state.


Thank you to anyone taking the time to read.

JG

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: Countdown Timer (custom and official) 5 second warning
« Reply #1 on: March 03, 2017, 04:13:21 AM »
Hi,
I made you a sample and a video how you could do this  :


OddButAwesome

  • Playmaker Newbie
  • *
  • Posts: 49
    • Odd but Awesome Apps on Playstore
Re: Countdown Timer (custom and official) 5 second warning
« Reply #2 on: March 03, 2017, 10:15:07 PM »
Thank you so much DJDino!

Awesome as always. I will give this a shot tonight after work. I will let you know how I go =D

JG

OddButAwesome

  • Playmaker Newbie
  • *
  • Posts: 49
    • Odd but Awesome Apps on Playstore
Re: Countdown Timer (custom and official) 5 second warning
« Reply #3 on: April 21, 2017, 09:47:38 PM »
Hi again,

The solution in the vid worked a treat! I hope you got my thank you DJDino ;).

It's been a while. Have been making levels and graphic assets since last post.

One more question - how do I stop/restart the timer when the player presses the pause button? I have a pause button which activates the Scale Time action (to 0) but the timer appears to continue. Objects and animations etc seem to freeze but the timer still counts down.

Cheers
JG

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: Countdown Timer (custom and official) 5 second warning
« Reply #4 on: April 22, 2017, 01:51:55 AM »
Hi,
Happy to help.

un-check real-time should help :)

OddButAwesome

  • Playmaker Newbie
  • *
  • Posts: 49
    • Odd but Awesome Apps on Playstore
Re: Countdown Timer (custom and official) 5 second warning [SOLVED]
« Reply #5 on: April 22, 2017, 03:18:32 AM »
Thanks again mate!

So obvious once explained. but I still missed it lol.

Cheers

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7615
    • jinxtergames
Re: Countdown Timer (custom and official) 5 second warning
« Reply #6 on: April 22, 2017, 08:46:32 AM »
np  ;)