No categories assigned

LUA:StartConversation

LUA Functions: StartConversation()

Starts a dialog between the given NPC and the given player


Syntax

StartConversation(param1, param2, param3, param4, [param5], [param6], [param7])


Parameters

Required - param1 (Conversation), param2 (Spawn), param3 (Spawn), param4 (string)
param1 is the conversation to start
param2 is the spawn talking
param3 is the player the spawn is talking to
param4 is what he spawn is saying
Optional - param5 (string), param6 (int32), param7 (int32)
param5 is the voice over mp3 file
param6 is the first key for the voice over
param7 is the second key for the voice over


Usage

function hailed(NPC, Spawn)
    local con = CreateConversation()
    AddConversationOption(con, "Bye!")
    StartConversation(con, NPC, Spawn, "Hello!")
end

When hailed this NPC will start a simple chat bubble conversation with the player