Skip to content
Snippets Groups Projects
Commit 1f8fcd83 authored by Jan-Nikjas Hartmann's avatar Jan-Nikjas Hartmann
Browse files

Solved issue#5 with initializing the AudioComponents for SocialGroups when...

Solved issue#5 with initializing the AudioComponents for SocialGroups when starting their dialogue (second try)
parent 1ceed65d
Branches
No related tags found
No related merge requests found
......@@ -382,7 +382,16 @@ TArray<AVirtualHuman*> ASocialGroup::SpawnInGroupFormation()
bool ASocialGroup::StartDialogue(float InitialDelay)
{
// if bStartDialogue was not true the AudioComponents of the social group need to be initialized since that only happened for the social groups where the dialogue was started before.
if (bStartDialogue == false) {
bStartDialogue = true;
for (int i = 0; i < AgentsInGroup.Num(); i++)
{
auto VH = AgentsInGroup[i];
auto SGComp = GetSocialGroupsComponent(VH);
SGComp->InitializeParameters(this);
}
}
SetupDialogue();
GetWorld()->GetTimerManager().SetTimer(SpeakerTimerHandle, this, &ASocialGroup::SetSpeaker, InitialDelay,false);
return true;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment