How to make multiple clicks on one object return different dialogues?

  • #1, by armhansonTuesday, 08. December 2015, 06:35 9 years ago
    I'm trying to setup the object interactions so that if you click on the same object (or character) twice, the first time the playable character's dialogue will say one thing, the second time a different thing, or maybe another character will become active and voice their own dialogue. Is there a quick Lua script that I should insert for that or a built in command that I haven't seen yet? Thanks for the input!

    Newbie

    20 Posts


  • #2, by sebastianTuesday, 08. December 2015, 08:53 9 years ago
    just trigger a condition to true or change a variable to 1,2,3,... if you spoke to them the first time. before dialog starts check the condition/variable and then depending of its state starta different dialog

    Thread Captain

    2346 Posts

  • #3, by afrlmeTuesday, 08. December 2015, 12:28 9 years ago
    just trigger a condition to true or change a variable to 1,2,3,... if you spoke to them the first time. before dialog starts check the condition/variable and then depending of its state starta different dialog


    You mean value not variable, but yeah... that's the way to go about it. If queries combined with conditions or values. If you are feeling adventurous then you could also have it return a random display text by using the set random value action part as the first action part in your action block, then you would add the if value = x queries as per usual.

    Imperator

    7278 Posts

  • #4, by armhansonThursday, 10. December 2015, 06:55 9 years ago
    Thanks for the help! Would you be so kind as to show me an example of what you're talking about? I really don't know the first thing about values, but I think I get the idea of what they'll do. I just don't know how to connect the values to the action.

    Newbie

    20 Posts

  • #5, by afrlmeThursday, 10. December 2015, 10:31 9 years ago
    Sure... here you go. I've attached screenshots of two methods.

    The first involves incrementing or manually updating the value number each time you trigger a set of actions inside of an if query.

    The second involves setting a random value between the minimum & maximum amount of dialogs you have. As you can see in the invalid_generic_refusals action block, I have 10 display texts because I am starting at a value of 0 & ending with a value of 9.

    P.S: if you are using the incremental method then you will need to add a quit current action action part before the end of each end if action part. The reason for this is because Visionaire Studio iterates through the action list one by one, so... if you were to update the value & there was an if query further down the action list that contained that value, then it would automatically trigger the actions contained within that if query too. The reason I haven't added a quit current action to the final if query is because there are no other actions / if queries below it, so there wasn't a need for one.

    Imperator

    7278 Posts