Followed your advice: much better . Now, giving a detailled debriefing.
.
.
I want this:
Inside a city, whenever the PC enters a trigger layed at city gate, a dialog appears to propose 3 choices:
to leave city way a
to leave city way b
to stay
.
Spots are:
001_TR_GATE // trigger layed at city gate
001_WP_WAY_A // waypoint placed in another Area (a road by forest)
001_WP_WAY_B // waypoint placed in another Area (a road by desert)
001_WP_BAK // waypoint placed some steps back out of 001_TR_GATE
.
001_TR_GATE has
OnEnter: 001_in_tr
void main()
{
// Get the creature who triggered this event.
object oPC = GetEnteringObject();
// Only fire for (real) PCs.
if ( !GetIsPC(oPC) || GetIsDMPossessed(oPC) )
return;
// Cutscene functions:
SetCutsceneMode(oPC, TRUE);
// Have us strike up a conversation with the PC.
ActionStartConversation(oPC, "001cv_gate", TRUE, FALSE);
}
.
OnExit: 001_out_tr
void main()
{
// Get the creature who triggered this event.
object oPC = GetExitingObject();
// Only fire for (real) PCs.
if ( !GetIsPC(oPC) || GetIsDMPossessed(oPC) )
return;
// Cutscene functions:
SetCutsceneMode(oPC, FALSE);
}
.
.
The trigger fires the conversation 001cv_gate
Leaving city?
Yes, following north road (way A) → Action 001_way_a
Yes, following easth road (way B) → Action 001_way_b
No, staying city. → Action 001_bak
.
001_way_a
void main()
{
object oParty;
object oTarget;
// Get the PC who is in this conversation.
object oPC = GetPCSpeaker();
// Find the location to which to teleport.
oTarget = GetWaypointByTag("001_WP_WAY_A");
// Teleport the PC's party.
// Loop through the PC's party.
oParty = GetFirstFactionMember(oPC, FALSE);
while ( oParty != OBJECT_INVALID )
{
AssignCommand(oParty, ClearAllActions());
AssignCommand(oParty, JumpToObject(oTarget));
// Update the loop.
oParty = GetNextFactionMember(oPC, FALSE);
}
}
.
001_way_b
void main()
{
object oParty;
object oTarget;
// Get the PC who is in this conversation.
object oPC = GetPCSpeaker();
// Find the location to which to teleport.
oTarget = GetWaypointByTag("001_WP_WAY_B");
// Teleport the PC's party.
// Loop through the PC's party.
oParty = GetFirstFactionMember(oPC, FALSE);
while ( oParty != OBJECT_INVALID )
{
AssignCommand(oParty, ClearAllActions());
AssignCommand(oParty, JumpToObject(oTarget));
// Update the loop.
oParty = GetNextFactionMember(oPC, FALSE);
}
}
.
001_bak
void main()
{
// Get the PC who is in this conversation.
object oPC = GetPCSpeaker();
// Have the PC perform a sequence of actions.
AssignCommand(oPC, ActionMoveToObject(GetNearestObjectByTag("001_WP_BAK")));
}
So any choice results includes to exit the trigger and to exit the trigger ends Cutscene Mode.
BUT
.
A) I tested, conversation in cutscene mode works and I cannot cancel it.
I still NOT yet USED this:
if (GetLocalInt(oPC, "NoAbort"))
return;
But I see that ESCAPE does not work anyway, what may explain that?
.
.
B) Should I be more cautious and should I add
CutsceneMode(oPC, FALSE);
into the choice scripts too?
(001_way_a, 001_way_b, 001_bak)
.
.
PS:
Of course, I do not have the coding level and I always have to use:
LS Script Generator, v.TK.0