I find it humbling that even though I had basic knowledge in C++, I can't even figure out how to program the most basic actions in NWScript ):
So I'm trying to create a full cutscene where the PC is invisible. I'll figure out all the camera angles and crazy stuff later, but right now I'm trying to make two NPC's have a conversation with each other. Assuming there's no way to have NPC-to-NPC dialogue box conversations, this will have to be shown through floaty text.
I'm can't seem to figure out how to correctly stagger the text, so that one line will appear, wait a few seconds, the next line appears, waits a few seconds and so on and so forth. All the actions seem to start at the same time, and my ActionWait commands are applied individually rather than in sucession.
Also, I noticed when the script executed my code, it didn't name the player whatever the user would have named the PC, but rather just called him/her 'Player'. "So I got a dialogue that went: You're looking for Player?"
// I have no idea what the code is to insert the code into text boxes haha. I tried variants of 'nwscript', but none of them worked ):
void main ()
{
// Variable Declaration of Independence
object npc_vurk = GetObjectByTag ("npc_vurk");
object npc_amilia = GetObjectByTag ("npc_amilia");
object npc_lemli = GetObjectByTag ("npc_lemlia");
object npc_vrish = GetObjectByTag ("npc_vrish");
string pc_alias = GetPCPlayerName (GetEnteringObject());
// Dialogue Strings
string talk_prison001 = "Hello miss. Correct me if I'm wrong, but I ain't see you round here before. How can Vurk be of service?";
string talk_prison002 = "... I'm here to see " + pc_alias;
string talk_prison003 = "You want to see " + pc_alias + "? Haha. Can't do that. A prisoner in solitary ain't seein' nobody.";
string talk_prison004 = "Where's Lemli?";
string talk_prison005 = "The warden? That ain't goin' do much. It's state law miss--";
string talk_prison006 = "Miss...";
string talk_prison007 = "Miss!!!";
// Meat of the Story
AssignCommand (npc_vurk, ActionSpeakString (talk_prison001));
ActionWait(5.0);
AssignCommand (npc_amilia, ActionSpeakString (talk_prison002));
ActionWait(5.0);s
AssignCommand (npc_vurk, ActionSpeakString (talk_prison003));
ActionWait(5.0);
AssignCommand (npc_amilia, ActionSpeakString (talk_prison004));
ActionWait(3.0);
AssignCommand (npc_vurk, ActionSpeakString (talk_prison005));
ActionWait(3.5);
AssignCommand (npc_amilia, ActionSpeakString (talk_prison006));
ActionWait(1.5);
AssignCommand (npc_vurk, ActionSpeakString (talk_prison007));
}
Modifié par redmokah, 16 février 2011 - 01:54 .