Helper functions for handling sound, music and dialogue
bool _Sound_Global_EntryAffected(int alIdx, eSoundEntryType aAffectedTypes)
void Sound_SetGlobalSpeed(float afFreq, eSoundEntryType aAffectedTypes=eSoundEntryType_WorldAll)
Sets the relative frequency of all sounds.
void Sound_FadeGlobalSpeed(float afFreq, float afTime, eSoundEntryType aAffectedTypes=eSoundEntryType_WorldAll)
Fade the relative frequency of all sounds.
void Sound_SetGlobalVolume(float afVolume, eSoundEntryType aAffectedTypes=eSoundEntryType_WorldAll)
Set the relative volume of all sounds.
void Sound_FadeGlobalVolume(float afVolume, float afTime, eSoundEntryType aAffectedTypes=eSoundEntryType_WorldAll)
Fade the relative volume of all sounds.
void Sound_CreateAIEventAtEntity(const tString &in asEntity, float afRadius, int alPrio)
Creates an event that is heard by any entity with the Listener component
void Sound_CreateAtEntity(const tString &in asSoundName, const tString &in asSoundFile, const tString &in asEntity, float afFadeTime=0.0f, bool abSaveSound=false, float afTargetVolume=1.0f)
Create and play a sound (.snt) file at the position of an entity or player.
void Sound_CreateAtEntity_UsePrefix(const tString &in asSoundName, const tString &in asSoundFile, const tString &in asEntity, float afFadeTime, bool abSaveSound, float afTargetVolume=1.0f)
Create and play a sound (.snt) file at the position of an entity or player. If a Soundscape area SoundPrefix is set, then that will be used as a parent folder for the sound.
void _Voice_PlayWhenPossible_CheckTimer(const tString &in asTimer)
void Voice_AbortIfQueued(const tString &in asSubject)
If a subject is queued (still not played) after started with Voice_PlayWhenPossible, use this to remove it and make sure it never plays
void Voice_ClearQueued()
Clears all queued subjects.
bool Voice_IsQueued(const tString &in asSubject)
If a subject is queued with Voice_PlayWhenPossible, return true
bool Voice_SubjectExists(const tString &in asSubject)
Checks if the specified subject exists.
int Voice_GetSubjectLineNumber(const tString &in asSubject)
Gets the number of subject lines in a subject. Returns 0 if the subject does not exist.
tString Voice_GetSubjectSceneName(const tString &in asSubject)
Gets the name of the scene that the specified subject belongs to.
Returns: tString , The scene the subject belongs to.
void Voice_SetSource(const tString &in asCharacter, const tString &in asEntityName, float afMinDistance, float afMaxDistance, bool abUse3D, float afMaxPlayerListeningRange=-1, float afMinFreq=22000, float afMaxFreq=22000, eLuxVoiceSourceFreqencyFlag aFrequencyFlags=eLuxVoiceSourceFreqencyFlag_None)
Sets the source of voice. Note that this can be a moving entity.
void Voice_StopAll()
Stops all voices playing
void Voice_Stop(const tString &in asScene)
Stops all voices in a scene.
void Voice_SkipCurrentLine(const tString &in asScene)
Skips the current line (same as stop but response triggers are used)
void Voice_SkipCurrentSound(const tString &in asScene)
Skips the current sound and jumps to next (if any)
void Voice_AdvanceFromCurrentSound(const tString &in asScene)
Like SkipCurrentSound, but if there is subtitle it makes sure it is displayed first.
void Voice_SetPaused(const tString &in asScene, bool abX)
void Voice_SetPausedAll(bool abX)
Stops all active voice scenes
void Voice_SetFocusScene(const tString &in asScene)
Sets the focus for a scene even if a scene with higher focusprio is playing. This makes the voices in the scene show subtitles and voices from other scenes lower. This will stay in effect until another scene is set. Note that a new subject in a scene with higher focus prio will override this.
void Dialog_StartConversation(const tString &in asVoiceCharacter, const tString &in asFocusEntityName, float afMaxMoveDist=0.5f, cVector3f avFocusOffset=cVector3f_Zero)
Starts a dialog with an entity.
tString Dialog_GetCharacterScene(const tString &in asCharacter)
Gets the scene the character is currently in.
void Dialog_SetVar(const tString &in asVar, int alValue=1)
Sets the value of an internal Dialog variable
void Dialog_IncVar(const tString &in asVar, int alValue=1)
Incremements the value of an internal Dialog variable. If var was not set priorly, it will start with 0.
int Dialog_GetVar(const tString &in asVar)
Gets the value of an internal Dialog variable. If it does not exist, 0 is returned.
void Dialog_GetCharactersInSubject(const tString &in asSubject, array< tString > &out avOutCharacters)
Returns a list of the characters who speak in a particular dialog subject.