Bitte unterstützt uns und bestellt über diese Links bei Amazon oder HumbleBumble!
Voice speechWith AGS you can link a line of dialog to a speech file, to enable "talkie"- style games. Suppose you have a dialog script with the following: ego: "Hi! How are you?"david: "I'm fine."Normally this would display the words in the speech text above the characters heads. However, you can add the special character '&' to symbolise that a voice file should also be played. The file name is made up of the first four letters of the character's script name, then an ID number. For example, ego: &10 "Hi! How are you?"david: &7 "I'm fine."This would play EGO10.WAV with the first line, and DAVI7.WAV with the second. When a line of text has a voice linked to it, the text on the screen will not be removed until the voice file has finished playing. If the player interrupts it by clicking the mouse or pressing a key, the text and voice will be stopped. Voice files must be placed in the "Speech" sub-directory of the game folder.You can also use speech with Say script function. cEgo.Say("&10 Hi! How are you?");cDavid.Say("&7 I'm fine.");NOTE: WAV, OGG and MP3 format files can be used for speech.NOTE: You cannot use speech file numbers above 9999. That is, you can have EGO1.OGG all the way up to EGO9999.OGG, but not EGO10000.OGG or higher.Speech is compiled into a file called SPEECH.VOX and is separate from the rest of your game data so that you can offer it as an optional extra download to the player. The game will function correctly if the file is not present.SeeAlso: SetVoiceMode script function.
SetVoiceModeSetVoiceMode (VoiceMode)Determines whether voice speech and/or text captions are used in the game.Valid values for VoiceMode are: eSpeechTextOnly no voice, text onlyeSpeechVoiceAndText both voice and texteSpeechVoiceOnly voice only, no textThe default is eSpeechVoiceAndText if in-game speech is enabled, and eSpeechTextOnly if it is not. Changing this setting changes the behaviour of all Say and Display commands which have a speech file assigned to them.WARNING: you should only ever use eSpeechVoiceOnly at the player's request to do so, because there is no guarantee that they even have a sound card and so may not understand what is going on.Example: if (IsSpeechVoxAvailable()==1) SetVoiceMode(eSpeechVoiceAndText); will set the voice mode to voice and text if the voice pack is available.