How do I implement multiple chunks of dialogue with xml.

  • I have recently been trying to understand how to use xml to create dialogue systems.

    Ive tested some example .capx files and I thought I understood. I then tried to implement it so it could choose from multiple sets of dialogue. To do this, I followed the same template in the xml as the first one, then changed the tag. However, as soon as I change it and try to load the second set of dialogue, it doesn't work.

    I switched around the order in the xml file and then the second one (now first) worked but the original didnt.

    What am I doing wrong? Thanks in advanced. (Nothing too complex please, im a total noob )

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Assuming all the texts are in a single XML I will do something like this...

    <dialogues>
    <conversation id="1">
    This is the first text	
    </conversation>
    <conversation id="2">
    This is the second text	
    </conversation>
    </dialogues>[/code:326mz5zm]
    
    You start with a ForEach node loop /dialogues/conversation
    
    Then inside the loop you can look for the id, XML.StringValue(@id)="1" and retrieve the conversation text with XML.StringValue("conversation/text()")
Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)