OpenGothic icon indicating copy to clipboard operation
OpenGothic copied to clipboard

Revisit `aiQueue` and `aiQueueOverlay`

Open Try opened this issue 2 years ago • 0 comments

Based on discussion in discord https://discord.com/channels/989316194148433950/1006242446860107888/1161805115079008266

AI_PointAt should act as overlay, and we also have some similar cases in code: AI_LookAtNpc, AI_LookAtNpc, AI_PointAtNpc - those are paired with similar stop-function

Example:

func void PC_Psionic_TRAIN_Info()
{
    AI_Output(self, other, "PC_Psionic_TRAIN_Info_05_01"); // output of dialog-line
    AI_PointAt(self, "PSI_PATH_9_14");                     // start pointing to point (overlay queue)
    AI_StopPointAt(self);                                  // <wait for "PC_Psionic_TRAIN_Info_05_01">; stop pointing 
    AI_Output(self, other, "PC_Psionic_TRAIN_Info_05_02"); // <wait for "PC_Psionic_TRAIN_Info_05_01">; output of next dialog-line
    ...
};

Another example from G2: https://www.youtube.com/watch?v=tLDN3gcr0GI&t=1089s

func void DIA_Jorgen_Novice_Info()
{
	AI_Output(other,self,"DIA_Jorgen_Novice_15_00");	//Have you seen a novice walk past?
	AI_Output(self,other,"DIA_Jorgen_Novice_07_01");	//Yeah, sure, he went thataway.
	AI_PointAt(self,"NW_TROLLAREA_NOVCHASE_01");
	AI_Output(self,other,"DIA_Jorgen_Novice_07_02");	//He jumped into the water off the bridge and swam like a shark was after him.
	AI_StopPointAt(self);
};

Try avatar Oct 12 '23 15:10 Try