Pavlos Posted October 25, 2005 Share Posted October 25, 2005 Again, I'm sorry but I did search for this and whether or not it is because I didn't specify correctly in the search or because I looked over it I don't know. How would I go about having a certain dialogue option that once said when you open up the conversation again it will produce a different greeting response from the default For Example: Normal Greeting: Greetings, I am Pavlos, how may I be of service WE GO THROUGH LOADS AND LOADS OF DIALOGUE OPTIONS [Repair] Rewire the droid so it recognises you as master Blah blah responses Close dialogue open Dialogue Greetings, master, how can I help you today? How can I do that? Link to comment Share on other sites More sharing options...
Darth InSidious Posted October 25, 2005 Share Posted October 25, 2005 Different dialogue nodes, and a conditional script should do it....I think. Link to comment Share on other sites More sharing options...
Pavlos Posted October 25, 2005 Author Share Posted October 25, 2005 Ok so how would I go about doing that? Would this work? int StartingConditional() { object oPC= GetPCSpeaker(); int nSkill = GetSkillRank(SKILL_REPAIR, oPC); if (nSkill>= 5) { return TRUE; SetGlobalNumber("001ebo_3cfd_repaired", 1); } return FALSE; } [/Code] I don't know I followed the short tutorial and I don't think it would work. Link to comment Share on other sites More sharing options...
Darkkender Posted October 25, 2005 Share Posted October 25, 2005 The best example to work with would be from Kotor 1. Extract one of the Main NPC dialogues such as HK-47. With one of the dialogue editors view your dialogue and you will see some sort of field at the bottom stating script conditional or something like that. For many of the branched script greetings you'll see a script listed there. The sample script you posted above would be a good conditional script to use there. Of course your script should look like the following if all it is doing is checking the single conditional. void main() { object oPC= GetPCSpeaker(); int nSkill = GetSkillRank(SKILL_REPAIR, oPC); if (nSkill>= 5) { return TRUE; SetGlobalNumber("001ebo_3cfd_repaired", 1); } return FALSE; } Link to comment Share on other sites More sharing options...
Pavlos Posted October 25, 2005 Author Share Posted October 25, 2005 Ok, I created that one for the [Repair] Option so that when it is a success you get the SetGlobalNumber("001ebo_3cfd_repaired", 1); [/Code] so if I wanted to then check that that had been set would I do, [Code] int StartingConditional() { return (GetGlobalNumber ("001ebo_3cfd_repaired") == 1); } [/Code]? Link to comment Share on other sites More sharing options...
Darth333 Posted October 25, 2005 Share Posted October 25, 2005 err... you have to use int StartingConditional and not void main() and place your script in the conditional script field that determines whether the conversation node will be available. int StartingConditional() { object oPC= GetPCSpeaker(); int nSkill = GetSkillRank(SKILL_REPAIR, oPC); if (nSkill>= 5) { return TRUE; } return FALSE; } Then, in the normal script field (script that is fired when the dialogue is "spoken" ), you place something like this: void main() { SetGlobalNumber("001ebo_3cfd_repaired", 1); } While you may use use a GlobalNumber or GlobalBoolean for this, it may be overkill depending on what you want to do. If you want an npc to say something only one time you would be better using a LocalBoolean. Local variables are stored on an object and Globals affect the whole game. Also, local variables do not require you to edit globalcat.2da. Use globals when you need to keep track of a quest, of the actions of your PC, per example. Finally, also note that in TSL, you don't need to make a script to set a global variable: just type in a_global_set or a local_set (I think that's the correct .nss but double check it as I don't have the game with me) and then use the parameter fields: http://img.photobucket.com/albums/v144/Darth333/paramcopy.jpg Link to comment Share on other sites More sharing options...
Pavlos Posted October 25, 2005 Author Share Posted October 25, 2005 Thanks a lot I've got it now. What my problem was was that my changed option was below the default one, is there any way to start a new entry above an already entered one, as cutting and pasting seems to mess it up slightly. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.