Instant Messenger Mechanics
{
<!-- Save our response -->
(set: $responses to (a: "You up?" ) )
<!-- Save their response -->
(set: $responses to it + (a: "Yeah.") )
<!-- Display the current chat log -->
(display: "Messenger")
}
|=
[[I need your help.]]
=|
[[How have you been?]]
|==|{
(set: $right to true)
}<div class="container">
{
(for: each _response, ...$responses)[
(if: $right is true)[
<div class='right speech bubble-right'>_response</div>
(set: $right to false)
] (else:) [
<div class='left speech bubble-left'>_response</div>
(set: $right to true)
]
]
}
$thread
</div>The game //Emily is Away// (2015) uses the interface of AOL Instant Messenger as part of its core mechanic. In order to progress the story, you choose a response and have a conversation with Emily.
(You can find the game for free on <a href="http://store.steampowered.com/app/417860/Emily_is_Away/">Steam</a>. Go check it out!)
Using Harlowe 2.0 and some CSS, we can replicate the same general design of a messenger interface.
[[Start]]{
<!-- Save our response from passage name -->
(set: $responses to it + (a: (passage:)'s name) )
<!-- Save their response -->
(set: $responses to it + (a: "What's wrong?") )
<!-- Display the current chat log -->
(display: "Messenger")
}{
<!-- Save our response from passage name -->
(set: $responses to it + (a: (passage:)'s name) )
<!-- Save their response -->
(set: $responses to it + (a: "Pretty good. You?") )
<!-- Display the current chat log -->
(display: "Messenger")
}