Chaos Project

RPG Maker => RPG Maker Scripts => Topic started by: Heretic86 on August 15, 2012, 06:58:07 am

Title: XP Sound Effect in a Move Route created by a Script...
Post by: Heretic86 on August 15, 2012, 06:58:07 am
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?

Title: Re: XP Sound Effect in a Move Route created by a Script...
Post by: ForeverZer0 on August 15, 2012, 08:55:03 am
If I remember correctly, the parameters are an audio file.

sfx = RPG::AudioFile.new('name', 80, 100)
Title: Re: XP Sound Effect in a Move Route created by a Script...
Post by: Heretic86 on August 16, 2012, 03:36:57 am
Seems to work just fine!  Thanks again F0!