Friday, June 6, 2014

Basic conversation engine working





Yay, the basic conversation engine is in place. As an added bonus, its now possible to trigger world events based on conversation elements (dialog, responses).

Illustrated above is the ability to make the character sit down at the end of a piece of dialog.

Here's the definition for that, notice the event stanza in the triggers for the dialog:

<key>2</key>
<dict>
    <key>text</key>
    <string>I understand. But hurry! there is not much time.</string>

    <key>nextDialog</key>
    <string>_END_</string>

    <key>triggers</key>
    <array>
        <dict>
            <key>events</key>
            <array>
                <dict>
                    <key>type</key>
                    <string>entityStand</string>
                    <key>entityName</key>
                    <string>Senopati</string>
                    <key>action</key>
                    <string>sit</string>
                </dict>
            </array>
        </dict>
    </array>


</dict>

The possibilities are wide open now: set quest flags, receive items, play music, whatever I need to happen in conjunction with dialog.

No comments:

Post a Comment