Creating and testing macro
This commit is contained in:
@ -27,6 +27,12 @@ State.variables.characters = [
|
||||
}
|
||||
]
|
||||
|
||||
// Choose one of an array
|
||||
var randomChoice = function(vals) {
|
||||
return vals[Math.floor(Math.random() * vals.length)];
|
||||
};
|
||||
|
||||
|
||||
StoryManager.storylets["Conversation"] = {
|
||||
name: "Conversation",
|
||||
tags: ["circulating"],
|
||||
@ -82,15 +88,12 @@ StoryManager.storylets["Conversation topic"] = {
|
||||
|
||||
:: Start
|
||||
You stand at the edge of the grand ballroom in the Duchess's palace.<br>
|
||||
<<set _possibleStories = window.SM.getStorylets(3, "circulating")>>
|
||||
<<ShowStoryletLinks _possibleStories>>
|
||||
|
||||
<<getStoryletLinks 3 "circulating">>
|
||||
|
||||
:: Conversation
|
||||
<<set $talkingTo = $currentStorylet.character>>
|
||||
You talk with $talkingTo.name. <br>
|
||||
<<set _possibleStories = window.SM.getStorylets(3, "during conversation")>>
|
||||
<<ShowStoryletLinks _possibleStories>>
|
||||
<<getStoryletLinks 3 "during conversation">>
|
||||
[[Keep circulating | Start]]
|
||||
|
||||
:: Being approached
|
||||
|
Reference in New Issue
Block a user