What script would i need if i wanted a dlg line to show up just one time?
I need 2 scripts for 1 line: 1. show up only if i talked to another npc and only show up once.
If the only condition for the first dialog entry is that the PC has or has not spoken to the NPC before then you can use the game script "c_talkedto" in the nodes condition box and "a_talktrue" in the same nodes fire when spoken box.
"c_talkedto" will allow the dialog node to show if you have not talked to the NPC before if you have then the node will be unavailable.
"a_talktrue" will set the SetTalkedToBooleanFlag for that NPC that owns the dialog.
You can also use globalbooleans to check the nodes availabilty. It works similar to the first method but allows you much more control. You can use the games generic c_global scripts to check for your global and a_global scripts to set the globals. For details on how to use them find them in the source scripts section of KT (note*K1 does not support this type of script. you will have to write the K1 global check and set scripts yourself.
on C_talkedto do you have to have a string perameter?
No, the two scripts will do everything for you. Be aware though that this can only be used once per npc, If you need to do this multiple times for the same npc then you will have to either use global or local variables.
thanks, no only need it for one instance in a dlg. i actualy just got through wrighting a complex dlg & scripts using the C_haveitem and C_giveitem and C_talkedto where you have to do missions for that npc and everytime you finish a mission it asks you are you finished with lvl 1 mission if so then give next mission if not then tell player come back when mission is completed.
and the very first one was welcoming the player to the tsf academy and didn't want that to repeat more than once. i also have a line that says "You don't belong back here" if you didn't talk to the recruiter. at the end of the dlg after all the tasks are completed the npc says congradulations, you have graduated the TSF Academy.( i would like fireworks to go off, or some kind of effect to where its like a graduation party)
Woops, i seem to have a slight problem...
on the first line in the dlg i have:
Welcome Private <FULLNAME>, In order to graduate the TSF you will be presented with several tasks such as conflicts,combat, and others.
for that line i have in conditional item c_talkedto and nuthing in p1-p5 and nuthing in string pram. and it keeps comming back up, after he says it the first time and i go away and come back he says the same line again and not the next line. any ideas? i also have another conditional c_hasitem (tsfrecruit)
that seems to work. if i don't have the item it won't show but if i have the item i want it to just show up once.
Did you add "a_talktrue" to the fire when spoken script box of the same dialog line.
If you don't add that script also the flag won't be set and the line will continue to appear
ok, that fixed my first line but now im having a problem with the following:
After hear the first line it gives you an item called "givefirst" witch lets it show the line "Have you completed your first Task" the person you went to complete the task has given you "donefirst" item and that trigers the Yes, its done answer and then goes on to give you the Second Task. but somereason it keeps sticking on the first Task and won't pass if i have the second task or not. is there a way to destroy an item at the end of a task like when it says Good job, now your second task is... put in script to destroy item "givefirst"
so you only have the one item "givesecond". I tried using a_destroy "tag" and it didn't work. it still stuck on the first line for "Have you completed the first Task"
the above worked fine when i delete the previous task item, it goes to the next task like its supose to. but somereason c_destroy "tagname" doesn't destroy the item in inventory.
To do the quest stuff your going to have to use globalvariables to tell the game when a dialog line should appear and when its no longer usefull.
If you want to detroy and item in the PC's inventory then use "a_take_item"