Skip to content

KAI_Voice

inkoalawetrust edited this page Jan 18, 2025 · 4 revisions

Description

This is the data structure that stores a voice that can then be used my KAI_Actors to make them speak. Each type of sound goes to it's own unique array container. These entries are generated during the parsing of KAI_VOICES lumps/files and all put in NPCVoices. However, you can of course also create custom entries yourself and put them in the NPCVoices array (Though do keep in mind that said array is transient, to allow for changing KAI_VOICES definitions on the fly between saves and having those changes reflect).

Warning

If you want to manually add voice entries to NPCVoices. Make sure that the names used for your non-parsed packs aren't the same as any existing pack, this can be done by checking for duplicates with FindDuplicateVoice() first. Otherwise GetNPCVoice() will just return the first similarly named entry it finds and ignore yours. (Both of these functions are in KAI_EventHandler.)

Variables

Name

Type: String

The name of the voice pack, this is also its' unique identifier.

See, PlayerSee, Fear, Idle, Hazard, PlayerFear, OrderChange, GroupJoin, GroupLeave, Death, AllyDeath, AllyPlayerDeath, EnemyDeath, AllyVehicleDeath, EnemyVehicleDeath, AllyRevive, EnemyRevive, Revive

Type: Sound

These are all the Sound type arrays that store every default voice type in a KAI_Voice pack, more info on what the intended purpose of each of these arrays is can be found here.

CustomTypes

Type: KAI_CustomVoice array

An array that stores all of the arbitrary, custom voice types defined for the pack.

Functions

GetCustomType()

Parameters:

  • Name: The name of the custom voice type to look for.

Function:

Looks for the voice type with the specified Name in the voice pack.

Return:

A pointer to the custom voice type with that Name. Null if nothing is found.

See also

Clone this wiki locally