Multi-branching simulation

akzme2
akzme2 Community Member Posts: 45

Hmm, that would be interesting.  I have some initial thoughts, though I'm sure they'd change greatly through the course of the work.

 

I think that making use of chapters/sections would be handy.  Each branch has its own section.  I could see handling variables one of two ways:

* Create a variable for each possible branch.
* Create one variable and add text to it when each branch is visited.

In either case, visiting a section means that a variable is changed.  Either the variable associated with that section is changed from 0 to 1, or the section name is added to the master variable (with a conditional only if the variable does not already contain the section name). 

Then, you can determine your feedback based on which sections were visited.  So, if a section variable is 1 (or the master variable contains the section name), then specific feedback is given.

I'm not sure if I prefer the idea of making different text boxes for the different choices or one large text box that changes according to the feedback.  The nice thing about having different text boxes that show only when certain conditions are met is that what you see is basically what you get.  The nice thing about having one large text box where the contents are changed at runtime is that any formatting changes can be done only once, but it'll be harder for future developers unless you document where the changes are being made.  It depends on your style.

 

If it were me, I'd probably rely on the master variable and change the contents of the final feedback texts.  But that's just how I work.  In any case, I really do think that breaking your branches into sections will help you greatly...at least just for the sake of organization.

 

Kevin