playMaker

Author Topic: Need Help for Timer <Solved>  (Read 1947 times)

ch1ky3n

  • Full Member
  • ***
  • Posts: 208
Need Help for Timer <Solved>
« on: November 05, 2017, 01:29:37 AM »
Hi Guys,

I'm new to playmaker and i'm attempt to create FSM that can give me a variable of FPS, Second and millisecond.
It works !, but sometimes if i look at the inspector during the play, the variables could change into weird numbers for a split second  such as: FPS shows infinty or 120 fps (it is so fast that i could barely catch the screenshot)
i wonder what is leaking ...
i hope someone could tell me what to do

Thank You

PS: I attached the screenshots of my doings

« Last Edit: November 05, 2017, 10:21:00 PM by ch1ky3n »

Fat Pug Studio

  • Beta Group
  • Hero Member
  • *
  • Posts: 1294
    • Fat Pug Studio
Re: Need Help for Timer
« Reply #1 on: November 05, 2017, 06:03:58 AM »
Why not try limiting fps?
Available for Playmaker work

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Need Help for Timer
« Reply #2 on: November 05, 2017, 08:29:01 AM »
Hi,
The send event in state 1 should not have every frame checked.
But i do not think that would solve the issue.

The reason is that when you reset and go back, the time in current state starts with 0 and if the visual update is just on the moment that it is 0 you will see the 'infinite'

In theory it does the infinite every time you reset. but it only displays it sometimes.

ch1ky3n

  • Full Member
  • ***
  • Posts: 208
Re: Need Help for Timer
« Reply #3 on: November 05, 2017, 08:37:23 AM »
Yeah it still display it sometime, but based on your explanation, it should be no problem to continue using it right ?

can i rely this fsm to make a stopwatch for example ?
i guess it should never display my stopwatch as infinity right ?

Thank You sooo much for answering

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Need Help for Timer
« Reply #4 on: November 05, 2017, 09:09:26 AM »
Hi,
For a stopwacht the setup would be different as you would not need to use 'divide'

What are you planning to do with the fps your are getting?


ch1ky3n

  • Full Member
  • ***
  • Posts: 208
Re: Need Help for Timer
« Reply #5 on: November 05, 2017, 12:42:59 PM »
i sent you a private msg

plz check sir