Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Dialogue choices

Guest
Apr 23, 2012 Apr 23, 2012

I'm working on a book where the user can select various dialogue choices. These lead to different dialogue that are displayed on the screen.

Structure:

I'm planning only to include 2 choices whenever choices pop up to keep things simple, and all choices eventually merge together into the same path in the same number of steps (for example if choosing choice 1 leads to 3 more unique dialogue, then choosing choice 2 also leads to 3 more). These choices never intersect and never have another set of choices until the paths are merged, also to keep it simple.

This is what I mean by intersecting, which is not what I'm doing (thought I'd like to include this in future projects):

Paths that cross each other and open up more choices, etc.

All my dialogue paths will be completely linear and parallel.

I'm having serious trouble doing this just in AS/Flash with arrays, and I get lost very easily because my script is obviously much longer and complex than the example I drew.

Is there a tutorial on how to do this kind of dialogue choices, maybe with XML or something?

Thanks.

TOPICS
ActionScript
523
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Apr 24, 2012 Apr 24, 2012
LATEST

what you're looking at is a Tree and I don't think xml is going to be a good way to represent the data.

Whatever way you choose to represent the data you need to parse it into a tree like structure perhaps using your own implementation of a singly Linked List. (i.e. each node will know its children but a child will not know its parent)

then for each Dialogue (or node) in your tree you can get the available children

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines