Author Topic: TypewriterEffect charsPerSecond is bounded by Framerate  (Read 4500 times)

yuewah

  • Full Member
  • ***
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 180
    • View Profile
TypewriterEffect charsPerSecond is bounded by Framerate
« on: June 26, 2014, 04:49:01 AM »
How to allow TypewriterEffect ignore from framerate ?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: TypewriterEffect charsPerSecond is bounded by Framerate
« Reply #1 on: June 26, 2014, 11:19:58 AM »
Try this.

yuewah

  • Full Member
  • ***
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 180
    • View Profile
Re: TypewriterEffect charsPerSecond is bounded by Framerate
« Reply #2 on: July 06, 2014, 09:33:17 PM »
it only work for the first time, it failed if reset to beginning

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: TypewriterEffect charsPerSecond is bounded by Framerate
« Reply #3 on: July 07, 2014, 03:58:53 AM »
You should call Finish() before ResetToBeginning().

Can also probably change the function to:
  1.         public void ResetToBeginning ()
  2.         {
  3.                 Finish();
  4.                 mReset = true;
  5.                 mActive = true;
  6.         }
« Last Edit: July 07, 2014, 04:04:37 AM by ArenMook »

yuewah

  • Full Member
  • ***
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 180
    • View Profile
Re: TypewriterEffect charsPerSecond is bounded by Framerate
« Reply #4 on: July 07, 2014, 10:03:18 AM »
You should call Finish() before ResetToBeginning().

Can also probably change the function to:
  1.         public void ResetToBeginning ()
  2.         {
  3.                 Finish();
  4.                 mReset = true;
  5.                 mActive = true;
  6.         }

Thank, that's what I changed, would you add this fix to next update.
I think the common use case for the Typewriter Effect is Dialogue Text.
e.g.
1. Play the dialogue text with Typewriter Effect
2. Click to finish the text
3. Click again to update text with next dialogue
4. Repeat 1.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: TypewriterEffect charsPerSecond is bounded by Framerate
« Reply #5 on: July 08, 2014, 08:42:34 AM »
Yup, already done.