Added to the tutorial, and some more API tweaks
This commit is contained in:
@@ -165,22 +165,23 @@ StoryManager.storylets["Conversation"] = {
|
||||
let storylet = {
|
||||
passage: "Conversation",
|
||||
description: "Talk to " + character.name,
|
||||
payload: {character: character},
|
||||
priority: 0
|
||||
priority: 0,
|
||||
character: character
|
||||
|
||||
}
|
||||
storylets.push(storylet);
|
||||
}
|
||||
return storylets;
|
||||
}
|
||||
};</script><tw-passagedata pid="1" name="StoryManager Widgets" tags="widget" position="100,100" size="100,100"><<widget ShowStorylets>>
|
||||
};</script><tw-passagedata pid="1" name="StoryManager Widgets" tags="widget" position="100,100" size="100,100"><<widget ShowStoryletLinks>>
|
||||
<<for _storylet range $args[0]>>
|
||||
<<capture _storylet>>
|
||||
[[_storylet.description|_storylet.passage][$payload=_storylet.payload]]<br>
|
||||
[[_storylet.description|_storylet.passage][$currentStorylet=_storylet]]<br>
|
||||
<</capture>>
|
||||
<</for>>
|
||||
<</widget>></tw-passagedata><tw-passagedata pid="2" name="Start" tags="" position="225,100" size="100,100">You stand at the edge of the grand ballroom in the Duchess's palace.
|
||||
<</widget>></tw-passagedata><tw-passagedata pid="2" name="Start" tags="" position="225,100" size="100,100">You stand at the edge of the grand ballroom in the Duchess's palace.<br>
|
||||
<<set _possibleStories = window.SM.getNStorylets(3)>>
|
||||
<<ShowStorylets _possibleStories>></tw-passagedata><tw-passagedata pid="3" name="Conversation" tags="" position="350,100" size="100,100"><<set $talkingTo = $payload.character>>
|
||||
<<ShowStoryletLinks _possibleStories>></tw-passagedata><tw-passagedata pid="3" name="Conversation" tags="" position="350,100" size="100,100"><<set $talkingTo = $currentStorylet.character>>
|
||||
You make polite conversation with $talkingTo.name. <br>
|
||||
[[Keep circulating | Start]]</tw-passagedata></tw-storydata>
|
||||
<script id="script-sugarcube" type="text/javascript">
|
||||
|
||||
Reference in New Issue
Block a user