-
Notifications
You must be signed in to change notification settings - Fork 0
Script Interface
muczc1wek edited this page Feb 22, 2025
·
6 revisions
The script interface is based on the LeGo Trialogue package, but instead of TRIA_
prefix we use zMul_
prefix. This makes it easy to port dialogues from LeGo to zMultilogue.
Invites Npc to the Multilogue
func void zMul_Invite(var C_NPC slf) {};
Parameters
-
var C_NPC slf
- Npc to invite
Starts the Multilogue
func void zMul_Start() {};
Changes talking NPC
func void zMul_Next(var C_NPC slf) {};
Parameters
-
var C_NPC slf
- Next talking NPC
Finishes the Multilogue
func void zMul_Finish() {};
Warning
When adding choices to dialogue zMul_Finish
have to be called before Info_AddChoice
Makes invited NPC's wait for slf
and each other
func void zMul_Wait(var C_NPC slf) {};
Parameters
-
var C_NPC slf
- NPC to wait for
The following example demonstrates how to create a simple multilogue with two NPCs.
instance DIA_TEST_ZMUL(C_INFO)
{
npc = PC_Thief_NW;
nr = 0;
condition = DIA_TEST_ZMUL_Condition;
information = DIA_TEST_ZMUL_Info;
permanent = FALSE;
description = "Multilogue test";
};
FUNC INT DIA_TEST_ZMUL_Condition()
{
return TRUE;
};
FUNC VOID DIA_TEST_ZMUL_Info()
{
var C_NPC diego; diego = Hlp_GetNpc(PC_Thief_NW);
var C_NPC xardas; xardas = Hlp_GetNpc(NONE_100_Xardas);
zMul_Invite(xardas);
zMul_Start();
AI_Output(other, self, "DIA_TEST_ZMUL_15_00"); //I found your gold!
zMul_Next(diego);
AI_Output(self, other, "DIA_TEST_ZMUL_11_01"); //Great. Show me.
zMul_Next(xardas);
AI_Output(self, other, "DIA_TEST_ZMUL_14_02"); //What gold?
AI_Output(other, self, "DIA_TEST_ZMUL_15_03"); //None of your business.
AI_Output(self, other, "DIA_TEST_ZMUL_14_04"); //Okay. I will be in the tower.
zMul_Next(diego);
AI_Output(self, other, "DIA_TEST_ZMUL_11_05"); //Give me the gold now.
zMul_Finish();
};