Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: on Thu 27/05/2004 20:06:50

Title: Play music
Post by: on Thu 27/05/2004 20:06:50

Playmusic (1);

But, the midifile where i put?
Title: Re: Play music
Post by: ElectricMonk on Thu 27/05/2004 20:08:32
In the game folder, the same one where you save your rooms.
NOT in the "Compiled" folder.
Title: Re: Play music
Post by: on Fri 28/05/2004 13:24:14
How i called it?
Title: Re: Play music
Post by: Barbarian on Fri 28/05/2004 13:49:09
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
Title: Re: Play music
Post by: TerranRich on Fri 28/05/2004 14:17:52
All of this is, of course, in the AGS Manual. Did you try reading through it, TAFFURI?