Closed you-win closed 3 years ago
Describe the bug After diverting from a knot and calling an external function from the new knot
To Reproduce Example included below. When diverting to quest_completed from from_quest_accepted_0, the function end_quest(quest_name) is called twice.
quest_completed
from_quest_accepted_0
end_quest(quest_name)
= from_quest_accepted_0 ~ current_speaker = "LEFT" "..." * {check_quest(quest_name)} "Yes" [] -> quest_completed * {not check_quest(quest_name)} "Yes" (lie) [] -> quest_completed_lie * "Not yet" [] -> from_quest_accepted_1 === quest_completed ~ current_speaker = "RIGHT" {end_quest(quest_name)} "Well ain't that something. I guess there are still good people out there." * [next] -> dialogue_end
Expected behavior When diverting to a new knot, the end_quest function should only be called once.
end_quest
The problem is fixed if the choice is structured like so:
* {check_quest(quest_name)} ["Yes"] -> quest_completed
Note that the "Yes" has been moved inside the brackets.
It can also be fixed by removing the newline like so:
However, following this pattern for other diverts breaks the formatting since the newline is no longer present.
* "Yes" [] -> start_scenario
This causes "Yes" to be displayed on the same line as the divert.
Ink files Available upon request
Environment:
Additional context
So according to this piece of documentation, this is known behavior. Closing the issue.
Describe the bug After diverting from a knot and calling an external function from the new knot
To Reproduce Example included below. When diverting to
quest_completed
fromfrom_quest_accepted_0
, the functionend_quest(quest_name)
is called twice.Expected behavior When diverting to a new knot, the
end_quest
function should only be called once.The problem is fixed if the choice is structured like so:
Note that the "Yes" has been moved inside the brackets.
It can also be fixed by removing the newline like so:
However, following this pattern for other diverts breaks the formatting since the newline is no longer present.
This causes "Yes" to be displayed on the same line as the divert.
Ink files Available upon request
Environment:
Additional context