Note: LucasForums Archive Project
The content here was reconstructed by scraping the Wayback Machine in an effort to restore some of what was lost when LF went down. The LucasForums Archive Project claims no ownership over the content or assets that were archived on archive.org.

This project is meant for research purposes only.

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

Page: 1 of 1
 DarthDementous
11-26-2006, 3:36 PM
#1
How do I make a certain dialogue string be available only once so the PC can't repeat the thing ever again?
 InyriForge
11-26-2006, 11:46 PM
#2
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.
 LiquidZoo
11-27-2006, 12:09 AM
#3
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
Page: 1 of 1