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.

[K1] Dialog Question

Page: 1 of 1
 Mindtwistah
03-30-2008, 1:18 PM
#1
How can I make it so that I only can choose a reply once?
Example: You go to a NPC and he asks you what you want to buy.You get a lot of options to choose from, but if you choose one you cannot choose that one again next time you talk to him.
 Mindtwistah
04-05-2008, 10:49 PM
#2
I'm so sorry for double posting here, please forgive me (and don't give me a ban x|) but I really need an answer and the thread was already on the second page. I promise I won't bump it again :(
 Jacob Dakari
04-05-2008, 10:57 PM
#3
Basically... it's a script that you have to attach to some part of the dialogue. (Perferably the end, that way that you can get it the first time XD) Yeah... I can't remember the script though... I accidently found it once, but I lost it, probably in my trash can, then deleted. :(
 sekan
04-06-2008, 4:49 AM
#4
Go to Bif --> 2da --> 2da array and extract gloalcat.2da

Open globalcat.2da.
Now you can either create your own global or use on from taris. ( If your mod doesn't happen on taris)

If you created your own it should look something like this.

Name Type
444 Test Number


Be sure that that type is number.

Now create a script that you attach in the dailog after that line that you want to only happen once. This script shall be in fire when spoken.


void main() {
SetGlobalNumber("test", 1);


}


Now create another script and attach it on the dailog line that you want to only happen once. This script shall be placed in the determines availability.




int StartingConditional() {
int i = GetGlobalNumber("test");
if (i == 0){
return TRUE;
}
return FALSE;
}


Now put your changed dialog, these two script and globalcat IF you created your own global in the override.

Hope it works.
 Mindtwistah
04-06-2008, 10:08 AM
#5
Thank you Sekan! :D You are sure to be put in the credits when I'm done! :)
Page: 1 of 1