Music, Sound & Speech: Difference between revisions

Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 2: Line 2:
''How do I get sound/music into my game? Is there a menu or editor within AGS that I can use to add music/sound files into, or what?''
''How do I get sound/music into my game? Is there a menu or editor within AGS that I can use to add music/sound files into, or what?''


Nope. It's actually very simple. To use sound effects, you may need to use script, or the "'''Game - play sound effect'''" and "'''Game - play music'''" action in the interaction editor (on the other hand, sound effect for a score increase, can be set in the General pane of the AGS Editor). Check out the '''PlaySound()''' command in the AGS manual. To do it via the interaction editor approach, just choose the interaction editor (the button with the letter 'i', which is available in several panes of the editor), you can use room/object/whatever interactions and choose the correct event (like "'''player enters room'''" or "'''player looks at hotspot'''" or whatever), and find the "'''Game - play sound'''" or "'''Game - Play music'''" event. Then, simply choose the sound/music number. For music, you might also be able to set a certain background music file to play upon entering a room. This can be found in the '''Rooms/Settings''' pane, with a "'''Play music on load'''" checkbox and a text box beside it, where you can type in the number. If you way '''Music4.mid''' or '''Music4.mp3''' (only one '''Music4.*''' file can exist at a time) to play, simply type in the number 4.
Nope. It's actually very simple. To use sound effects, you may need to use script, or the "'''Game - play sound effect'''" and "'''Game - play music'''" actions in the interaction editor (on the other hand, sound effect for a score increase, can be set in the General pane of the AGS Editor). Check out the '''PlaySound()''' command in the AGS manual. To do it via the interaction editor approach, just choose the interaction editor (the button with the letter 'i', which is available in several panes of the editor), you can use room/object/whatever interactions and choose the correct event (like "'''player enters room'''" or "'''player looks at hotspot'''" or whatever), and find the "'''Game - play sound'''" or "'''Game - Play music'''" event. Then, simply choose the sound/music number. For music, you might also be able to set a certain background music file to play upon entering a room. This can be found in the '''Rooms/Settings''' pane, with a "'''Play music on load'''" checkbox and a text box beside it, where you can type in the number. If you way '''Music4.mid''' or '''Music4.mp3''' (only one '''Music4.*''' file can exist at a time) to play, simply type in the number 4.


For speech, that's a whole different matter altogether. You need to use scripting, whether it's text scripting or dialog scripting. Check the manual for more information on speech. (Simply search for "Speech" under the Index tab.)
For speech, that's a whole different matter altogether. You need to use scripting, whether it's text scripting or dialog scripting. Check the manual for more information on speech. (Simply search for "Speech" under the Index tab.)