the following function according to the wiki, if param3 (optional) is left out , and then that option is seletion on the dialog screen, that the dialog box will close
that in fact is not happening, if you select the "close" option then the dialog box hangs and you have to close with x
LUA Functions: AddConversationOption()
Adds an option for a player to select in a dialog with an NPC.
Syntax
AddConversationOption(param1, param2, [param3])
Parameters
Required - param1 (conversation), param2 (string)
param1 must be a conversation
param2 is the option to add to the given conversation
Optional - param3 (string)
param3 is the custom function to call if this option is selected
Usage
Code: Select all
function hailed(NPC, Spawn)
-- have the NPC face the player
FaceTarget(NPC, Spawn)
-- create the conversation
conversation = CreateConversation()
-- set the 3 player options
AddConversationOption(conversation, "Good", "Choice1")
AddConversationOption(conversation, "Not so good.", "Choice2")
AddConversationOption(conversation, "I don't have time for this.")
-- set the npc dialog and start the conversation
StartConversation(conversation, NPC, Spawn, "Good to see you " .. GetName(Spawn) .. ", how are you today?")
endNotes
If param3 is left out then when the player selects that option the dialog will close.