New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Companions don't adjust their walking speed #10
Comments
gothic-1-community-patch/scriptbase/_work/Data/Scripts/Content/Story/ZS/ZS_FollowPC.d Lines 28 to 49 in 746a440
changed to func int ZS_FollowPC_Loop()
{
PrintDebugNpc (PD_TA_LOOP, "ZS_FollowPC_Loop");
PrintGlobals (PD_MST_DETAIL);
//-------- SC-Meister folgen ! --------
if C_BodyStateContains(hero, BS_WALK) // wenn SC geht, gehe ich auch
{
AI_SetWalkmode (self, NPC_WALK);
}
else if !C_BodyStateContains(self, BS_SWIM) // nur NPC_RUN wenn NPC nicht schwimmt und SC nicht geht
{
AI_SetWalkmode (self, NPC_RUN);
};
if (Npc_GetDistToNpc(self,hero) > HAI_DIST_FOLLOWPC)
{
AI_GotoNpc (self, hero);
}
else
{
B_SmartTurnToNpc(self, hero);
};
AI_Wait (self, 1);
return LOOP_CONTINUE;
}; |
The code does not fix the issue for me:
The reason for this is, that the state loop (ZS_FollowPC_Loop) is only called when all running AI-commands are completed. So until the NPC reaches the hero (from the command |
I fixed it here #76. With the use of |
#10: Adjust walk mode in follow state
No longer the external is hooked but its call intercepted
Describe the bug
Followers still run if the player walks.
Expected behavior
Followers adjust their walking speed according to the player. However, the player must be in sight of the follower if the player starts running after walking.
The text was updated successfully, but these errors were encountered: