playMaker

Author Topic: ...just another big Custom Action collection (A-L)  (Read 27429 times)

Broken Stylus

  • Beta Group
  • Hero Member
  • *
  • Posts: 772
Re: ...just another big Custom Action collection (A-L)
« Reply #45 on: April 25, 2022, 11:04:38 AM »
Hi.
It seems Countup timer resets the private float timer to 0f even not set up to be reset on entering the state.
Reset is set to false or none.
This doesn't happen if not using real time.
It looks like
Code: [Select]
timer = FsmTime.RealtimeSinceStartup - startTime;doesn't add time like it should.

Deek

  • Full Member
  • ***
  • Posts: 133
Re: ...just another big Custom Action collection (A-L)
« Reply #46 on: April 25, 2022, 03:58:38 PM »
Hi Broken Stylus,

thanks for finding and pointing out this bug.
I didn't add the previous timer value to the startTime when entering the state and when 'Restart On Enter' is not enabled. I also noticed that enabling the 'Reset' flag doesn't reset the startTimer.

I fixed both in the attached file and did thorough testing of each combination of the options, so it should work now without any flaws.

Greetings
Deek

Broken Stylus

  • Beta Group
  • Hero Member
  • *
  • Posts: 772
Re: ...just another big Custom Action collection (A-L)
« Reply #47 on: May 13, 2022, 05:41:47 AM »
Oh great!