Good afternoon. I can not solve the problem:
It is necessary that after talking with himself the hero turned 180 degrees. Now when there is a quest conversation with himself, the camera shows the hero in front. But the problem is that the hero turns, not the camera. And after the dialogue the hero does not turn back. Very much interferes.
void StartActorSelfDialog(string _CurrentNode, bool CameraFace, bool BackToPlayer)
{
LAi_SetActorType(pchar);
if(pchar.location.group == "sit")
{
LAi_ActorSetSitMode(pchar);
}
if(CameraFace == true)
{
LAi_CharacterSaveAy(pchar);
locCameraSleep(true);
if (stf(pchar.chr_ai.type.ay) > 0)
{
CharacterTurnAy(pchar, -PI + abs(stf(pchar.chr_ai.type.ay))); // 180 == 1
}
else
{
CharacterTurnAy(pchar, PI - abs(stf(pchar.chr_ai.type.ay))); // 180 == 1
}
}
pchar.Dialog.CurrentNode = _CurrentNode;
if(BackToPlayer && CameraFace)
{
LAi_ActorSelfDialog(pchar, "Turn180Player");
}
if(BackToPlayer && !CameraFace)
{
LAi_ActorSelfDialog(pchar, "pchar_back_to_player");
}
else
{
LAi_ActorSelfDialog(pchar, "");
}
}
case "Turn180Player":
Lai_SetPlayerType(pchar);
//Here we need a reversal
break;
It is necessary that after talking with himself the hero turned 180 degrees. Now when there is a quest conversation with himself, the camera shows the hero in front. But the problem is that the hero turns, not the camera. And after the dialogue the hero does not turn back. Very much interferes.
void StartActorSelfDialog(string _CurrentNode, bool CameraFace, bool BackToPlayer)
{
LAi_SetActorType(pchar);
if(pchar.location.group == "sit")
{
LAi_ActorSetSitMode(pchar);
}
if(CameraFace == true)
{
LAi_CharacterSaveAy(pchar);
locCameraSleep(true);
if (stf(pchar.chr_ai.type.ay) > 0)
{
CharacterTurnAy(pchar, -PI + abs(stf(pchar.chr_ai.type.ay))); // 180 == 1
}
else
{
CharacterTurnAy(pchar, PI - abs(stf(pchar.chr_ai.type.ay))); // 180 == 1
}
}
pchar.Dialog.CurrentNode = _CurrentNode;
if(BackToPlayer && CameraFace)
{
LAi_ActorSelfDialog(pchar, "Turn180Player");
}
if(BackToPlayer && !CameraFace)
{
LAi_ActorSelfDialog(pchar, "pchar_back_to_player");
}
else
{
LAi_ActorSelfDialog(pchar, "");
}
}
case "Turn180Player":
Lai_SetPlayerType(pchar);
//Here we need a reversal
break;