The onClientEnter cut scene script is a great way to start a cut scene conversation. Create either an Ipoint with a new tag or use a creature as the main speaker. Also create a conversation. Then plug these two into number three (below).
The condition to play and the additional cutscene scripting are great places to use variables, either on the module or campaign level, to control whether the cut scene should fire. For instance, if you set a quest tracking variable called "sidequest2" to be 10 when the party got the quest, and you wanted to test for condition sidequest2 == 10, you'd place that in step two below. Then in the additional cut scene scripting you'd update the quest tracking variable to 20 so that the game knew not to play this cutscene again.
// Area OnClientEnter Cutscene.nss
/*
Area OnClientEnter event handler template. Setup cutscene(s) to fire when the party enters a new area.
This script will execute after a group area transition using JumpPartyToArea().
bCutsceneCondition will determine if a cutscene should play, but each cutscene is restricted to play only once.
HOW TO SETUP A CUTSCENE:
0. Copy and paste script block into "CLIENT ENTER CUTSCENES"
1. Specify a title for your cutscene
2. Replace (FALSE) with condition to play cutscene
3. Specify Speaker and Dialog of conversation
4. Add additional cutscene scripting
// Cutscene: 1. Example Title
if (GetIsCutscenePending(stCI) == FALSE)
{
bCutsceneCondition = (FALSE); // 2. Replace (FALSE) with condition to play
sSpeakerTag = ""; // 3. Specify Speaker and Dialog
sDialogName = "";
stCI = SetupCutsceneInfo(stCI, sSpeakerTag, oPC, sDialogName, bCutsceneCondition);
if (GetIsCutscenePending(stCI) == TRUE)
{
// 4. Additional cutscene setup
}
}
*/
// BMA-OEI 2/3/06
// BMA-OEI 2/7/06 added speaker == PC check
// ChazM 2/7/06 modified implementation
// ChazM 2/7/06 moved funcs to ginc_cutscene
// BMA-OEI 2/7/06 support multiple cutscenes
// BMA-OEI 2/7/06 revert original controlled char
// BMA-OEI 2/8/06 added comments, Group Area Transition restriction
#include "ginc_cutscene"
int StartingConditional()
{
// Do not execute if OnClientEnter was not fired from a group area transition
if (FiredFromPartyTransition() == FALSE) return (FALSE);
// Get party leader, force control of owned PC
object oPC = GetFirstEnteringPC();
object oLeader = GetFactionLeader(oPC);
oPC = SetOwnersControlledCompanion(oLeader);
// Initialize temp CutsceneInfo
struct CutsceneInfo stCI;
stCI = ResetCutsceneInfo(stCI);
int bCutsceneCondition;
string sSpeakerTag;
string sDialogName;
// *** START CLIENT ENTER CUTSCENES ***
// Cutscene: 1. Example Title
if (GetIsCutscenePending(stCI) == FALSE)
{
bCutsceneCondition = (FALSE); // 2. Replace (FALSE) with condition to play
sSpeakerTag = ""; // 3. Specify Speaker and Dialog
sDialogName = "";
stCI = SetupCutsceneInfo(stCI, sSpeakerTag, oPC, sDialogName, bCutsceneCondition);
if (GetIsCutscenePending(stCI) == TRUE)
{
// 4. Additional cutscene setup
}
}
// *** END CLIENT ENTER CUTSCENES ***
// Cue cutscene or revert control to original character
if (GetIsCutscenePending(stCI) == TRUE)
{
FireAndForgetConversation(stCI.oSpeaker, oPC, stCI.sDialog);
}
else
{
SetOwnersControlledCompanion(oPC, oLeader);
}
// If cutscene is pending, fade to black
return GetIsCutscenePending(stCI);
}