This thread is a few years old. Some details may refer to an earlier version of Visionaire Studio. Current tutorials
The free version covers up to 25 scenes per project. For more scenes and to sell your game, you need a license. Forum readers get the Indie Bundle 15 % off with the code FORUM15: €84.15 instead of €99, valid until 31 Dec 2026.Black Friday: the Indie Bundle is 30 % off until 1 Dec 2026, €69.30 instead of €99. The code BLACKFRIDAY is already applied.
Get 15 % off Try it for free local dialogs = getObject("Characters[testnpc]"):getLinks(VCharacterDialogs)
local count = 0
for i = 1, #dialogs do -- iterate through the stored dialog options
count = count+1
end
print(count);
function count_dialog_options()
local dialog_options = getObject("Characters[testnpc].CharacterDialogs[Start]"):getLinks(VDialogDialogParts)
local count = 0
for i = 1, #dialog_options do -- iterate through the stored dialog options
count = count+1
end
print(count);
end
function cdo() -- count dialog options
local dialog_options = game.GameDialog:getLinks(VDialogDialogParts)
local count = 0
for i = 1, #dialog_options do -- iterate through the stored dialog options
count = count+1
end
print(count);
end
getObject("Characters[mynpc].CharacterDialogs[start]"):getLinks(VDialogDialogParts)
getObject("(" .. tableid .. "," .. id .. ")"):getLinks(VDialogDialogParts);
DialogPartReturn t_int
Defines which dialog is shown if this dialog part is selected (and the dialog part does not have a dialog with active dialog parts below):
'0' (eDialogReturnToSame): the same dialog will be shown again.
'1' (eDialogReturnToUpper): the 'upper' dialog (which linked to the current dialog) will be shown.
'2' (eDialogReturnToEnd): no dialog will be shown.
local dlg = 0
function init_dlg_loop()
dlg = #(game.Dialog.DialogParts)
-- code or function call that makes dialog background move
registerEventHandler("mainLoop", "dlg_loop")
end
function dlg_loop()
if #(game.Dialog.DialogParts) ~= dlg then
dlg = #(game.Dialog.DialogParts)
-- code or function call that makes dialog background move
end
end
Quick question: why do you iterate through the active dialog parts? Can you not use the # or table.maxn() to return the total index value?
This thread is closed because nobody has replied for more than a year. Feel free to ask your question in a new thread.
New threadDeponia, The Whispered World and more than 160 other games were made with Visionaire Studio. The free version covers up to 25 scenes. For your finished game there is Visionaire Studio PRO from €75 or the Indie Bundle for €99.
Until December 1: the Indie Bundle is 30% off with the code BLACKFRIDAY, €69.30 instead of €99.