Login / Registrieren
DE EN FR ES IT CZ
Zurück Nach oben

Automatically end dialog

  • #1, by ke4 12 years ago Zitieren
    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?
  • #2, by ke4 11 years ago Zitieren
    Is in Visionaire a function to check how many dialog options are currently in the dialog available?
  • #3, by afrlme 11 years ago Zitieren
    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.
  • #4, by ke4 11 years ago Zitieren
    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
    


    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.
  • #5, by sebastian 11 years ago Zitieren
    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...
  • #6, by sebastian 11 years ago Zitieren
    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...
  • #7, by ke4 11 years ago Zitieren
    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.