I want to know for what we need following fields:
node call_reason
{
do
{
digression disable sayHi;
goto next;
}
transitions
{
next: goto how_are_you;
}
}
I suppose, you are asking this question because you are a little bit confused about syntax, I'll try to make it clear.
DashaScript is the language for describing automated conversations. Basically, any conversation script consists of
In some sense, the scripted conversation can be thought of as a graph. In this case, nodes and transitions can be interpreted as vertices and edges of a graph, respectively.
Hence, node
and transition
define the structure of your conversation script.
Every node
has subsection do
where you can specify actions and instructions you want to be performed in this particular node
.
Also, node
may have subsection transitions
which is used to specify conditions of switching a current state to another.
Every event-transition (like transition on event and timer transition) specified in this section has the following syntax: <transition_name>: goto <node_name> on <switching_condition>
.
Instant transitions (like the one used in your code) have no conditions: <transition_name>: goto <node_name>
. To execute such transition, it must be called in section do
of current node with goto
instruction.
Also, there are special nodes that can be visited from any state. These nodes are called digressions. (see digressions doc). They are used to make fast reactions in your conversation and return to main branch of conversation. To control digression, we have mechanism of enabling/disabling them (see digression-control doc).
So, in your example, the node
with name call_reason
has section do
where you disable
degression-node and then instant transition with name next
is executed.
All entities of DashaScript language mentioned above are described in program structure docs. I would recommend you to check it out, since there are more important entities that you might need to know about.
set
is the instruction that is used for assigning a value for some variable. Example:
node some_node
{
do {
var some_variable: number = 1;
set some_variable = 2; // now some_variable has value of 2
}
}
exit
is the instruction that interrupts the dialog.