Obi Wan Pere

Help adding dialogs and scripting

Recommended Posts

They also work on triggers as well. It's common practice to set a local on a trigger the first time it fires. Gives more flexibility than outright destroying it for cases where you might want to reuse it.

All of K1's random loot placeables use locals in their heartbeat scripts to stop them respawning (although Obsidian added a new function for TSL to just remove the script altogether after firing, to cut down on overhead on the Xbox).

K1 makes extensive use of module locals for various quest states via the module includes.

  • Thanks 1

Share this post


Link to post
Share on other sites
4 minutes ago, DarthParametric said:

They also work on triggers as well. It's common practice to set a local on a trigger the first time it fires. Gives more flexibility than outright destroying it for cases where you might want to reuse it.

All of K1's random loot placeables use locals in their heartbeat scripts to stop them respawning (although Obsidian added a new function for TSL to just remove the script altogether after firing, to cut down on overhead on the Xbox).

K1 makes extensive use of module locals for various quest states via the module includes.

Good to know and incase anyone else is following this, I looked up https://deadlystream.com/topic/3201-kotor1-local-booleans/

Which could be handy for people and that they are found in "k_inc_generic" for TSL I had simply forgotten as I haven't really used them yet, though I have known for a while that I really should start doing so.

Share this post


Link to post
Share on other sites

Plot locals (i.e. 0 to 10) are in k_inc_utility in both games. The ones in other includes are AI (for the most part) related. 0-10 are the only ones you should be using for general purpose use. You'll potentially break things if you start using higher numbers.

  • Like 2

Share this post


Link to post
Share on other sites

This is the final solution used -and working-  just making one Script, using a Local Boolean Variable and the base-game script "k_con_talkedto". So is not needed modify the Globalcat.2da file.

void main()
{
    GiveXPToCreature(GetFirstPC(), XXX);
    SetLocalBoolean(OBJECT_SELF, 10, TRUE);
}

Attaching this Script in the "SCRIPT THAT FIRES WHEN SPOKEN" box and attaching  "k_con_talkedto" in the "SCRIPT THAT DETERMINES AVAILABILITY" box in the same line of the conversation in the DLG Editor.

Thanks @TamerBill

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.