Salk Posted August 20, 2018 Posted August 20, 2018 Hello! Being rusty and all and having forgotten most of that little I knew, I am asking assistance to tweak Gorton Colu's script (I believe k_ptar_gorton_ud.ncs) so that he won't be shouting his lines too often since that does interrupt what the two bystanders there would be saying when clicked on. Thanks! 1 Quote
DarthParametric Posted August 20, 2018 Posted August 20, 2018 Looks like you could change the GetDistanceBetween value so it only triggers when you are closer (currently appears to be 15m): void main() { int int1 = GetUserDefinedEventNumber(); if ((int1 == 1001)) { if ((!sub1(OBJECT_SELF, intGLOB_118))) { sub2(OBJECT_SELF, intGLOB_118, 1); } else { if ((!sub1(OBJECT_SELF, intGLOB_119))) { sub2(OBJECT_SELF, intGLOB_119, 1); } else { sub2(OBJECT_SELF, intGLOB_118, 0); sub2(OBJECT_SELF, intGLOB_119, 0); if (((!GetIsConversationActive()) && (GetDistanceBetween(OBJECT_SELF, GetPartyMemberByIndex(0)) < 15.0))) { sub3("ONE LINER", 5, 5, 5.0); SetGlobalBoolean("TAR_GORTONONELINER", 1); ClearAllActions(); ActionStartConversation(OBJECT_SELF, "", 0, 0, 1, "", "", "", "", "", ""); sub4(); } } } It could also be that sub3 is providing a delay timer, which would be 5 seconds if so. void sub3(string stringParam1, int intParam2, int intParam3, float floatParam4); Quote
Salk Posted August 20, 2018 Author Posted August 20, 2018 The problem is not the distance, which is fine. The issue is with the frequency of the ActionStartConversation - After triggering the first time, if the party member is in range, it starts again just after a few seconds. I did change the value for sub3 to 10 and then 30 but there's not been any change (by the way, sub3 is only for debugging purpose, from what I understand, and shouldn't even need to be considered anyway) Same result after using DelayCommand for the ActionStartConversation... Weird. Quote
Salk Posted August 20, 2018 Author Posted August 20, 2018 Well, if anyone is interested... I solved it, but in a way that I would call rudimentary at best (better method warmly welcome!). First of all, I changed the following line in k_ptar_gorton_ud.ncs if (((!GetIsConversationActive()) && (GetDistanceBetween(OBJECT_SELF, GetPartyMemberByIndex(0)) < 15.0))) { into this if (((!GetIsConversationActive()) && (GetDistanceBetween(OBJECT_SELF, GetPartyMemberByIndex(0)) < 7.5) && (GetGlobalBoolean("COLU_LISTENER") == 0))) { I had to add a Boolean to globalcat.2da in order to make this work Then I created k_ptar_cricolu0.ncs from this: void main() { DelayCommand(4.5, ActionDoCommand(SetGlobalBoolean("COLU_LISTENER", 0))); } and k_ptar_cricolu1.ncs void main() { SetGlobalBoolean("COLU_LISTENER", 1); } I replaced one of the two listeners with a female counterpart so that a few unused lines were restored as well (tar02_gostlistma.dlg). I have then proceeded to make the appropriate changes to both tar02_gostlistma.dlg and tar02_gostlistfe.dlg to make use of the two custom scripts above. I have also reintroduced the TALK_FORCEFUL animation to Gorton which would not kick in again after the player had talked to him the first time. Now Gorton won't interrupt anymore if one of the two listeners is speaking to the player. 1 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.