XP Sound Effect in a Move Route created by a Script...

Started by Heretic86, August 15, 2012, 06:58:07 am

Previous topic - Next topic

Heretic86

Hopefully an easy question.  Im trying to dynamically generate move routes with a Sound Effect in it.  I can do most of it, just stuck on the audio portion...


# Make a New Move Route
new_route = RPG::MoveRoute.new
# Required Parameters
route.repeat = false
route.skippable = false


I seem to do everything but do Sound Effects.  For example (and this bit works fine), Wait 4 Frames goes on like this:


route.list.unshift(RPG::MoveCommand.new(15, [4]))


Then to Execute:

# Run the Move Route
force_move_route(route)


But for Audio, I see the Command Code is 44 and it expects 3 parameters, @volume, @name, @pitch.  But upon further inspection, I see RPG::AudioFile.  So how exactly do I throw on a Sound Effect using Command Code 44?

Current Scripts:
Heretic's Moving Platforms

Current Demos:
Collection of Art and 100% Compatible Scripts

(Script Demos are all still available in the Collection link above.  I lost some individual demos due to a server crash.)

ForeverZer0

If I remember correctly, the parameters are an audio file.

sfx = RPG::AudioFile.new('name', 80, 100)
I am done scripting for RMXP. I will likely not offer support for even my own scripts anymore, but feel free to ask on the forum, there are plenty of other talented scripters that can help you.

Heretic86

Current Scripts:
Heretic's Moving Platforms

Current Demos:
Collection of Art and 100% Compatible Scripts

(Script Demos are all still available in the Collection link above.  I lost some individual demos due to a server crash.)