I have a setup with FMOD where when a letter appears in the dialogue, a short sound byte is played. Simple stuff to mimic speech. Here's the kicker,
I need some kind of system to basically detect the current speaker (The actor) and set an FMOD variable. Don't worry about the FMOD side of thing, that I can handle. I have ended up using the Text Animator
So, basically it's just kind of finding an EASY way to have a float variable (The pitch) associated with each invididual actor and have some way of another script to "get" that variable off the actor.
Get A Variable From Actor
Re: Get A Variable From Actor
Hi,
Add a script with an OnConversationLine(Subtitle) method to a GameObject in the Dialogue Manager's hierarchy. In it, you can check the speaker. Example:
Add a script with an OnConversationLine(Subtitle) method to a GameObject in the Dialogue Manager's hierarchy. In it, you can check the speaker. Example:
Code: Select all
void OnConversationLine(Subtitle subtitle)
{
Actor actor = DialogueManager.masterDatabase.GetActor(subtitle.speakerInfo.id);
float fmodVariable = actor.LookupFloat("FMODVariable");
}