DE EN FR ES IT CZ
Back Back to top

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

This thread is a few years old. Some details may refer to an earlier version of Visionaire Studio. Current tutorials

  • #1, by armhanson 11 years ago Quote
    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!
  • New to Visionaire Studio?

    Create point and click adventures without coding. The free version covers up to 25 scenes per project. For more scenes or to earn money with your game, you need a license.

    See the Indie Bundle Try it for free
  • #2, by sebastian 11 years ago Quote
    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
  • #3, by afrlme 11 years ago Quote
    “
    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.
  • #4, by armhanson 11 years ago Quote
    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.
  • #5, by afrlme 11 years ago Quote
    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.