Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
(Regular Expression) Letter Count
#1
So long story short, I have this script in my game's message boxes that pauses rendering for a bit after a . ! or ? (A sentence-by-sentence script instead of letter-by-letter) The regular expression that does this is:

Code:
@text.gsub!(/([?.!][^\n\z"])/) { "#{$1}\005[#{$game_system.message.end_delay}]" }

I want to change it so the pause before the next sentence to be based on the length of the sentence. How would I modify this regular expression to capture the sentence length into a variable?
Reply }


Messages In This Thread
(Regular Expression) Letter Count - by MechanicalPen - 03-13-2014, 11:34 PM



Users browsing this thread: