Save-Point
Universal Message System (Edit of SE character System) - Printable Version

+- Save-Point (https://www.save-point.org)
+-- Forum: Games Development (https://www.save-point.org/forum-4.html)
+--- Forum: Code Support (https://www.save-point.org/forum-20.html)
+--- Thread: Universal Message System (Edit of SE character System) (/thread-146.html)



Universal Message System (Edit of SE character System) - stordarth - 06-12-2010

This is an absolutely amazing script. I'm currently working on cloning the shining force engine, and this allows me to almost perfectly clone the message system. :D

I do have a request, if anyone script savvy could help. Having installed the script, I've noticed that the sound-upon-type plays for every character that is entered. I was looking at the script, and I know that I want to exclude spaces from the sound, but have no idea how to translate that into code.

Code:
while @ignore
        c = @text.slice!(/./m)
        if c != nil
          write_char(c)
        end
      end
      if @pause_time > 0
        @pause_time -= 1
        return
      end
      if Graphics.frame_count - @count >= speed
        if $game_system.sound_effect != ""
      ****** if c != " " ******
          Audio.se_play("Audio/SE/" + $game_system.sound_effect, 50, 100)
          end
        end
        @count = Graphics.frame_count
        c = @text.slice!(/./m)
        if c != nil
          write_char(c)
        end
      end
      return
    end

The asterisked line is my feeble attempt to acquire what i wanted, but i don't understand ruby script at all, despite numerous attempts to grasp it. Any help would be appreciated.