Play music

Started by , Thu 27/05/2004 20:06:50

Previous topic - Next topic

TAFFURI


Playmusic (1);

But, the midifile where i put?

ElectricMonk

In the game folder, the same one where you save your rooms.
NOT in the "Compiled" folder.

TAFFURI


Barbarian

It depends on the file extension, but you can use OGG, MP3, MIDI, WAV, MOD, XM, and S3M music files. SO, for example, you have a MIDI file you want to use for your music, name it like:

MUSIC1.MID

or if it's in MP3 format, then it'd be named MUSIC1.MP3

you can have a mix of different formats, and so it might look like

MUSIC1.MID
MUSIC2.WAV
MUSIC3.MP3

etc...
   But when you tell AGS to play a MUSIC file, you just supply the music file number accordingly.
So, example in a script, you might use:

PlayMusic(1);

  Or simply from the interface, for example, upon entering a room, from the room editor, and from the "Interaction" ( i ) button towards the top of the room editor, click and you will be presented with a choice of option. You can choose something such as: Player Enters Screen (before fadein), right-click and select "New Action", then choose "Game - Play Music" then put in the music file number ( example: the CHANGE button, then enter 1),  then OK. there you have it. when player enters that room, it should start playing your selected music file.  ;D
Conan: "To crush your enemies, see them driven before you, and to hear the lamentation of the women!"
Mongol General: "That is good."

Blade of Rage: www.BladeOfRage.com

TerranRich

All of this is, of course, in the AGS Manual. Did you try reading through it, TAFFURI?
Status: Trying to come up with some ideas...

SMF spam blocked by CleanTalk