Table of Contents

Class EntityTalkUtil

Namespace
Vintagestory.API.Util
Assembly
VintagestoryAPI.dll
public class EntityTalkUtil
Inheritance
EntityTalkUtil
Inherited Members
Extension Methods

Constructors

EntityTalkUtil(ICoreAPI, Entity, bool)

public EntityTalkUtil(ICoreAPI api, Entity atEntity, bool isMultiSoundVoice)

Parameters

api ICoreAPI
atEntity Entity
isMultiSoundVoice bool

Fields

AddSoundLengthChordDelay

public bool AddSoundLengthChordDelay

Field Value

bool

IsMultiSoundVoice

public bool IsMultiSoundVoice

Field Value

bool

LongNote

protected bool LongNote

Field Value

bool

ShouldDoIdleTalk

public bool ShouldDoIdleTalk

Field Value

bool

TalkPacketId

public const int TalkPacketId = 1231

Field Value

int

TalkSpeed

protected Dictionary<EnumTalkType, float> TalkSpeed

Field Value

Dictionary<EnumTalkType, float>

capi

protected ICoreClientAPI capi

Field Value

ICoreClientAPI

chordDelay

protected float chordDelay

Field Value

float

chordDelayMul

public float chordDelayMul

Field Value

float

currentLetterInWord

protected int currentLetterInWord

Field Value

int

entity

protected Entity entity

Field Value

Entity

idleTalkChance

public float idleTalkChance

Field Value

float

lettersLeftToTalk

protected int lettersLeftToTalk

Field Value

int

pitchModifier

public float pitchModifier

Field Value

float

sapi

protected ICoreServerAPI sapi

Field Value

ICoreServerAPI

slidingPitchSounds

protected List<SlidingPitchSound> slidingPitchSounds

Field Value

List<SlidingPitchSound>

soundLength

public float soundLength

Field Value

float

soundName

public AssetLocation soundName

Field Value

AssetLocation

stoppedSlidingSounds

protected List<SlidingPitchSound> stoppedSlidingSounds

Field Value

List<SlidingPitchSound>

talkType

protected EnumTalkType talkType

Field Value

EnumTalkType

totalLettersTalked

protected int totalLettersTalked

Field Value

int

totalLettersToTalk

protected int totalLettersToTalk

Field Value

int

volumneModifier

public float volumneModifier

Field Value

float

Properties

Rand

protected virtual Random Rand { get; }

Property Value

Random

Methods

GetSoundLocation(float, out float)

protected AssetLocation GetSoundLocation(float pitch, out float pitchOffset)

Parameters

pitch float
pitchOffset float

Returns

AssetLocation

OnGameTick(float)

public virtual void OnGameTick(float dt)

Parameters

dt float

PlaySound(float, float, float)

protected virtual void PlaySound(float startpitch, float volume, float length)

Parameters

startpitch float
volume float
length float

PlaySound(float, float, float, float, float)

protected virtual void PlaySound(float startPitch, float endPitch, float startvolume, float endvolumne, float length)

Parameters

startPitch float
endPitch float
startvolume float
endvolumne float
length float

SetModifiers(float, float, float)

public virtual void SetModifiers(float chordDelayMul = 1, float pitchModifier = 1, float volumneModifier = 1)

Parameters

chordDelayMul float
pitchModifier float
volumneModifier float

Talk(EnumTalkType)

public virtual void Talk(EnumTalkType talkType)

Parameters

talkType EnumTalkType