Automatically end dialog

  • #1, by ke4Tuesday, 30. December 2014, 20:26 5 years ago
    Hi,

    there is one thing i would like to includ into my game.
    I have in every dialog "ending dialog option", to i couldn't get stuck in the dialog, but it's annoying when i start a dialog and there is no dialog option to choose, but i need to end the dialog anyway, or when i click on the last dialog option and no options left, i need to end the dialog.

    So the idea is something like if statement - if there is no more dialog options / there is no any options - end this dialog.

    Is there option to detect these things in Visionaire?

    Key Killer

    810 Posts


  • #2, by ke4Saturday, 14. March 2015, 14:27 5 years ago
    Is in Visionaire a function to check how many dialog options are currently in the dialog available?

    Key Killer

    810 Posts

  • #3, by afrlmeSaturday, 14. March 2015, 15:20 5 years ago
    I think there's a way of checking how many dialog options are currently displayed on the screen. Not sure about checking the total amount of dialog options in the current dialog.

    Maybe you could setup some kind of if query using a value. In the execute / call action part of each dialog option you could add an if value = x then end dialog else value + 1. I guess either method has its drawbacks. The one I'm suggesting would mean more work for you.

    Imperator

    6804 Posts

  • #4, by ke4Monday, 17. August 2015, 16:25 5 years ago
    Sebastian.204 posted this script for counting a dialog options

    function cdo()
    local dialog_options = game.GameDialog:getLinks(VDialogDialogParts)
    local count = 0
    for i = 1, #dialog_options do

    count = count+1

    end
    print(count);
    end
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11


    But can i somehow quit current dialog with lua?

    And there is still the thing that i would need to call this function automaticly after every dialog part without assign it manually in all dialogs.

    Key Killer

    810 Posts

  • #5, by sebastianMonday, 17. August 2015, 18:12 5 years ago
    while this script works only when a dialog is shown and not in the time when a character talks between two dialogs it is difficult to run this function when it is needed... No hook for dialog start or dialog end...

    Thread Captain

    2334 Posts

  • #6, by sebastianMonday, 17. August 2015, 22:57 5 years ago
    For me when all dialog parts are used (and deleted) the dialog goes one node higher. I assume when also no dialog options are available in the root dialog, then it ends automatically...

    Thread Captain

    2334 Posts

  • #7, by ke4Tuesday, 18. August 2015, 08:15 5 years ago
    I forgot to mention i have always one fixed dialog option "End dialog"
    Doesn't work for me i get stuck in the dialog forever if i don't have this option.
    So if there is no any other option to ask means if the counter gets 1.

    Key Killer

    810 Posts

Write post