Forum rules - please read before posting.

How to show a dialogue portrait in a conversation

My "subtitles" menu is able to show who I am speaking to with a large portrait of them (think like a visual novel). This was easily done by, in my Subtitles menu, adding a "graphic" with graphic type: dialogue portrait. I'd like to essentially do the same thing when in a "conversation," but repeating the process for my Conversation menu does not yield the same results. Conversations don't get the same access to a character's dialogue settings that contain the "Default portrait graphic" and expressions. I'd like the character you are talking to to stay on the right side of my screen both when dialogue is playing and when an option is being selected from the "conversation" ui. How can I accomplish this?

Comments

  • What's your AC version?

    Rather than having two such elements in both the Subtitles and Conversation menu, in the same place, it's probably better to have this in a separate Menu that only shows the portrait.

    If you set this Menu's Appear type to Manual, you could control its display through scripting - but keep it enabled at all times for now, so we can see if the element itself is working.

    If a Graphic element of Dialogue Portrait is used outside of a Subtitles menu, it ought to show the character who last spoke - even if they are no longer speaking.

    If this isn't the behaviour you're getting, what are the exact results you're currently seeing?

  • Hm the default behavior of showing the last person to speak wouldn't be enough for my purposes so scripting will be the way to go. I'd imagine I can easily control the image component's image via scripting. Is there anything in the AC API to programmatically Get who my player is currently having a conversation with? Such that I can keep this image set to whoever I am speaking to?

  • I'd imagine a script could check if each NPC's conversation IsActive() and set the UI's image accordingly. Doing this in an Update loop seems inefficient, maybe I'd have to create it as a function that I call from the action list before I call for the conversation to start.

  • In AC terms, a Conversation object is essentially just a list of options. It's not technically aware of what NPC that Player character is dealing with - as clicking an option can cause any character to speak if you allow for that in the response ActionList.

    If you're looking to be efficient, the best way to react to things in AC is to rely on custom events. The OnStartSpeech event, for example, fires each time a character speaks. A script that hooks into this could check if the character speaking is an NPC, and react accordingly.

    A tutorial on reading events through script, and this event in particular, can be found here.

    However, it's also possible to react to such events without scripting - you can set up ActionLists to run at such times using the Events Editor, which can be accessed via the top toolbar.

    The Manual's "Custom events" chapter describes both of these techniques available.

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.