Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: ch1ky3n on November 05, 2017, 01:29:37 AM

Title: Need Help for Timer <Solved>
Post by: ch1ky3n 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

Title: Re: Need Help for Timer
Post by: Fat Pug Studio on November 05, 2017, 06:03:58 AM
Why not try limiting fps?
Title: Re: Need Help for Timer
Post by: djaydino 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.
Title: Re: Need Help for Timer
Post by: ch1ky3n 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
Title: Re: Need Help for Timer
Post by: djaydino 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?

Title: Re: Need Help for Timer
Post by: ch1ky3n on November 05, 2017, 12:42:59 PM
i sent you a private msg

plz check sir