Help - Search - Members - Calendar
Full Version: World's Most Newbie-ish Audio Question
RPG RPG Revolution Forums > Scripting > Script Development and Support > RGSS2
TheBen
If history has taught us anything, it's that I'm a terrible scripter, and if sanity has taught me anything, it's that I'm going to need your help to remedy my shortcoming. Now, I've been writing a script for RPGVX that randomizes various things such as Cursor SE, Battle BGM, etc. and I've figured out something very odd: the snippet
CODE
#Play one of a random array of SE files
  def self.play_random_sound(sounds_list)
    sound = sounds_list[rand(sounds_list.size)]
    Audio.se_play("Audio/SE/"+sound[0], sound[1], sound[2])
    #sound[0] = filename
    #sound[1] = volume
    #sound[2] = pitch
  end

Doesn't work for me, even though it's practically copied and pasted from the help manual itself. When I try to play, for example, "Confirm.ogg", I'm told that the game's "Unable to find Audio/SE/Confirm.ogg". I'm pretty much at a loss here - I've also tried making the SE files in the module and then using the play() method in-game, which actually makes more sense, now that I think about it, but I've gotten the same error.

Thanks in advance for the mockery help and criticism, which is always welcome... at least on a good day, but give it to me anyway.
biggrin.gif
Kread-EX
Are you sure the file even exists in your project? (It doesn't in the RTP, by the way).
TheBen
... Oh. Now I feel like an idiot. pinch.gif
Thanks, Kread. I should be fine now.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2013 Invision Power Services, Inc.