Salk

[KotOR] Help with an in game cutscene

Recommended Posts

Well, nobody chimed in about my code above so I must assume it will work fine.

 

I have another question about cutscenes and it is how to make sure that the animation I am going to play won't be skipped. I am using this script in a dialogue:

void main() {object oMan26_duan = GetObjectByTag("man26_duan", 0);
effect eSleep = EffectSleep();    
effect eDeath = EffectDeath();
SetIsDestroyable(0,0,1);
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eSleep, oMan26_duan, 6.0f);
DelayCommand(6.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDeath, oMan26_duan));
}
 
It works fine but I would like to make sure that the player doesn't skip through the animation by pressing the left mouse button. I made a few attempts using NoClickFor() (but it doesn't seem to work for me, I can still use the left mouse button to move the conversation ahead without being forced to wait a single second) and ActionPauseConversation()/ActionResumeConversation(). Using the latter I only accomplished to make the conversation *never* advance.

Any advice?

Thanks!

Share this post


Link to post
Share on other sites

Use ActionPauseConversation, then your animation code etc and then a DelayCommand for ActionResumeConversation to continue to the next line once everything is done.

Share this post


Link to post
Share on other sites

Sorry, my computer's been off and set aside while my brother moves so that it isn't in the way. I hope to set it up again tonight.

 

Your previous code should indeed be fine. Also, Kexikus is right, you need to DelayCommand the ActionResumeConversation for it to work right. 

 

ActionPauseConversation();

DelayCommand(3.0, ActionResumeConversation());

 

Alternatively, you could try setting the Delay field for the entry(or entries) in the DLG file to something other than -1. I forget if that will actually override the DLG's Skippable setting or not.

Share this post


Link to post
Share on other sites

Sorry, my computer's been off and set aside while my brother moves so that it isn't in the way. I hope to set it up again tonight.

 

Your previous code should indeed be fine. Also, Kexikus is right, you need to DelayCommand the ActionResumeConversation for it to work right. 

 

ActionPauseConversation();

DelayCommand(3.0, ActionResumeConversation());

 

Alternatively, you could try setting the Delay field for the entry(or entries) in the DLG file to something other than -1. I forget if that will actually override the DLG's Skippable setting or not.

 

No, that does not override the DLG's skippable setting in K1. All it does is to wait the set amount of time before starting the line but it can still be skipped even before it actually started.

Share this post


Link to post
Share on other sites

I did try adding the two lines to my code above but, just as before (I did try with the DelayCommand), the conversation does not unpause.

Share this post


Link to post
Share on other sites

Okay, I have another question here.

 

While testing dialogues I did notice how the party members interjecting should sometimes address a third party but talk to the Protagonist instead. I thought it was just a simple matter of inserting the appropriate tag in the Listener field of the DLGEditor but it does not work. At least, it is not reliable in all situations.

 

Does someone know why?

 

Is there something that can be done?

 

Thanks!

Share this post


Link to post
Share on other sites

That should have worked... Do you also have the Speaker field set to the Tag of the Party Member? You also need to be rather thorough about how you do the Class and Listener fields.

 

Check the k1r_vulksur2.dlg in tar_m10aa.mod to see how Carth acts when talking in the cutscene. I think that might help, maybe.

Share this post


Link to post
Share on other sites

That should have worked... Do you also have the Speaker field set to the Tag of the Party Member? You also need to be rather thorough about how you do the Class and Listener fields.

 

Check the k1r_vulksur2.dlg in tar_m10aa.mod to see how Carth acts when talking in the cutscene. I think that might help, maybe.

 

Yes, the speaker field is set to HK47 (I am testing this with the kor33_czerkarep.dlg file). I set the listener to "kor33_czerkarep" (Tag of the NPC) and that was the only change I made to E31. Out of curiosity, I tried setting it to "Mission" (the second party member) but even so, HK47 faced the Protagonist instead.

 

I am not sure I understand what the Class field is in this case?

 

I will check k1r_vulsur2.dlg and see if I can figure out whether or not I am missing something obvious?

 

Thanks!

Share this post


Link to post
Share on other sites

Well, from the way I understand it, what really matters is the Speaker field.

 

Taking as an example the original file 22aa_zalb01_01.dlg with Canderus and Juhani as party members we have the following:

 

E4 - *hmph* Maybe we should have brought the Wookiee out. This place looks... untamed. [sPEAKER: Cand LISTENER: Player]

R3 - (continue)

E5 - Are you afraid of the wild, Mandalore? Are you a coward? [sPEAKER: Juhani LISTENER: Cand]

R4 - (continue)

E6 - Mandalorians are not cowards! We're just practical. [sPEAKER: Cand]

R5 - (continue) [END DIALOGUE]

 

The problem with this is that line E6 should see Canderus facing Juhani while he instead faces PLAYER, which seems to be the default action. Adding LISTENER: Juhani to E6 does not fix it.

 

The only thing I could think of to make it work was to add a new empty Entry after R5 and set SPEAKER: Juhani to it. By doing that, Canderus delivers its last line facing Juhani, as it should be.

 

Is there a better/smarter method?

 

Cheers!

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.