playMaker

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

ch1ky3n

  • Playmaker Newbie
  • *
  • Posts: 3
    • View Profile
Need Help for Timer <Solved>
« on: November 04, 2017, 11:29:37 PM »
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, 08:21:00 PM by ch1ky3n »

krmko

  • Sr. Member
  • ****
  • Posts: 422
    • View Profile
    • Fat Pug Studio
Re: Need Help for Timer
« Reply #1 on: November 05, 2017, 04:03:58 AM »
Why not try limiting fps?

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 2279
    • View Profile
    • jinxtergames
Re: Need Help for Timer
« Reply #2 on: November 05, 2017, 06: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

  • Playmaker Newbie
  • *
  • Posts: 3
    • View Profile
Re: Need Help for Timer
« Reply #3 on: November 05, 2017, 06: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: 2279
    • View Profile
    • jinxtergames
Re: Need Help for Timer
« Reply #4 on: November 05, 2017, 07: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

  • Playmaker Newbie
  • *
  • Posts: 3
    • View Profile
Re: Need Help for Timer
« Reply #5 on: November 05, 2017, 10:42:59 AM »
i sent you a private msg

plz check sir