Jump to content

Home

How do I make a certain dialogue string be available only once?


DarthDementous

Recommended Posts

There are several ways to do this, but if, as I suspect, you're doing a recruitment mod, it may be best to assign a global variable to your dialogue. You can require a script for the dialogue branch to begin (such as variable such-and-such must equal one) and at the same time fire a script that increases said variable by one (now it will be two, so unless you decrease it back to one that dialogue will never fire again). This is how the main characters' dialogues work, and by looking at the scripts assigned to their dialogues it should become pretty easy to see how they've done it. Just remember to add the variable you want to use to globalcat.2da.

Link to comment
Share on other sites

For K1, there are a couple of premade scripts that will do exactly what you want.

 

k_con_talkedto (dialog is available, put this in the 'Script that determines availability' section of the first dialog link)

 

k_act_talktrue (put it in the 'Script that fires when spoken' section)

 

Note that both of those sections are as listed in DLGEditor 2.2.4

 

I've used these successfully in a mod I wrote, but haven't yet released for K1.

 

Also worth noting, the script k_act_exitarea will do just that, make the NPC walk away and disappear; if you're interested in that.

 

I'm sure there are similar scripts for TSL, but I don't know what they are off the top of my head.

 

edit: I just looked in KT, and the same scripts exist for TSL, but are named c_talkedto and a_talktrue. The exit area script appears to have 3 variations: a_exit, a_exit_run, and a_exit_walk

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...