Forum rules - please read before posting.

How to manually modify conversation option states?

edited May 2018 in Technical Q&A
I like to use "Mark Options Already Used" in the Conversation Menu, because it gives the player some visual feedback on which options he's already chosen

However, in the situation where you have nested dialogues, it becomes problematical

Say (because that's what I have got) that you have a number of top level options, one of which is "Church", and underneath "Church" you have four or five other topics, some of which may be switched off, depending on what stage of the game the player is at

Suppose the player goes through all the currently available options in "Church", leaves the conversation, performs some action which will switch on one of those topics, and then returns to the conversation. The "Church" option will still appear as if it's been exhausted, even though there are now new options available within it. That's a bit cheaty from a gameplay perspective, because it appears to be concealing vital information from the player

So, if it's at all possible, I'd like to be able to dynamically modify the "Option Already Used" state for individual topics. In the example above, that would mean setting the "Church" option so that when the player returns to the conversation after having completed an action that turns on the state of one of the underlying actions, it would look like the "Church" topic hadn't been used yet

Comments

  • The Scripting Guide describes all available public functions and variables in AC's API.  The entry on the Conversation component is here.

    Conversation myConversation;
    myConversation.options[0].hasBeenChosen = false;

    Where "0" is the index number of the option you want to modify.
  • cool. thanks for the info
  • As it turned out, I needed to sit down and write the script to dynamically modify the conversation option states in order to discover... that that wasn't actually what I wanted to do at all

    Because in many ways what I ended up with was almost as bad as the original problem, from a player's perspective. They'd finish the "Church" dialogue, and, because there were still hidden options yet to be revealed, my script would merrily set its hasBeenChosen state to false. But the player didn't know there were still options to be revealed, so the fact that the topic wasn't greyed out after they'd gone through all the available options would just have looked... buggy

    Well, it was a useful learning exercise, if nothing else. But what I eventually settled on was a new ActionList, pretty much a clone of ActionDialogOption.cs, but just with the option of setting hasBeenChosen true or false

    What I do in the game itself is, when the player performs an action that would reveal a new conversation option, I run that ActionList and set hasBeenChosen to false for the appropriate conversation option, so next time they enter the Conversation, the "Church" option (or whatever) is no longer greyed out, and it should therefore be obvious to them that there is a new option available in that topic


Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Welcome to the official forum for Adventure Creator.