Sound API

Note: Most of these are used through Animation Events or internally (which are called through the Emerald Components directly and not through the static EmeraldAPI script). All sounds are based off of an AI's assigned Sound Profile.

Play Sound Clip

Plays a sound clip according to the Clip parameter.

EmeraldAPI.Sound.PlaySoundClip(EmeraldSystem EmeraldComponent, AudioClip Clip)

Play Idle Sound

Plays a random idle sound based on your AI's Idle Sounds list. Can also be called through Animation Events.

EmeraldAPI.Sound.PlayIdleSound(EmeraldSystem EmeraldComponent);

Play Attack Sound

Plays a random attack sound based on your AI's Attack Sounds list. Can also be called through Animation Events.

EmeraldAPI.Sound.PlayAttackSound(EmeraldSystem EmeraldComponent);

Play Warning Sound

Plays a random warning sound based on your AI's Warning Sounds list. Can also be called through Animation Events.

EmeraldAPI.Sound.PlayWarningSound(EmeraldSystem EmeraldComponent);

Plays a random block sound based on your AI's Block Sounds list.

EmeraldAPI.Sound.PlayBlockSound(EmeraldSystem EmeraldComponent);

Play Death Sound

Plays a random death sound based on your AI's Death Sounds list. Can also be called through Animation Events.

EmeraldAPI.Sound.PlayDeathSound(EmeraldSystem EmeraldComponent);

Play Walk Sound

Plays a footstep sound from the AI's Footstep Sounds list to use when the AI is walking. This should be setup through an Animation Event.

EmeraldAPI.Sound.WalkFootstepSound(EmeraldSystem EmeraldComponent);

Play Run Sound

Plays a footstep sound from the AI's Footstep Sounds list to use when the AI is running. This should be setup through an Animation Event.

EmeraldAPI.Sound.RunFootstepSound(EmeraldSystem EmeraldComponent);

Play Random Sound Effect

Plays a random sound effect from the AI's General Sounds list.

EmeraldAPI.Sound.PlayRandomSoundEffect(EmeraldSystem EmeraldComponent);

Play Sound Effect Sound

Plays a sound effect from the AI's General Sounds list using the Sound Effect ID as the parameter. This is useful for creating sounds with Animation Events such an interaction sound.

EmeraldAPI.Sound.PlaySoundEffect(EmeraldSystem EmeraldComponent, int SoundEffectID)

Last updated