Autor Thema: Reden mit Soundfiles.  (Gelesen 1512 mal)


  • kleiner Tentakel
  • ***
  • Beiträge: 154
  • Geschlecht: Männlich
  • Psst. Willst du einen Keks (:?
    • Profil anzeigen
Reden mit Soundfiles.
« am: 06. Januar 2012, 21:10:46 »

Ich möchte nun bei einem privaten Projekt ein Spiel ohne die Schrift über dem Kopf wenn man redet, statt dessen sollte Musik abgespielt werden. Wie kann man die Schrift wegtun und stattdessen eine Sounddatei abspielen?

==> Projekte:

Wegen der Schule hat sich jetzt die Arbeitszeit veraendert, so dass ich nich mehr ganz so viel Zeit fuer die Projekte habe.
  • DOTT SP fuer AGS 3 (79%)
  • Eigene EPI (18%)
  • Laverne SP (42%)


  • International anerkannter Superheld
  • Globaler Moderator
  • alter Tentakel
  • *****
  • Beiträge: 2658
  • Geschlecht: Männlich
  • Grün Tentakel = Running Sushi!
    • Profil anzeigen
Re: Reden mit Soundfiles.
« Antwort #1 am: 06. Januar 2012, 22:30:02 »
auszug aus der hilfe von AGS3.2.1

Voice speech
With 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.

SetVoiceMode (VoiceMode)

Determines whether voice speech and/or text captions are used in the game.
Valid values for VoiceMode are:

eSpeechTextOnly      no voice, text only
eSpeechVoiceAndText  both voice and text
eSpeechVoiceOnly     voice only, no text

The 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.


if (IsSpeechVoxAvailable()==1)

will set the voice mode to voice and text if the voice pack is available.

Schlachtaman Vibrations, UHYEAH!!!

>>>> Ende der Kommunikation <<<<