Quantcast
Channel: Help! with 2.0 - Twine Forum
Viewing all articles
Browse latest Browse all 1844

Click Macro in Harlowe

$
0
0
Hi everyone,

I'm trying to attach sound files to different sentences in my story. I would like the user to be able to click on an image and here the .wav file multiple times. Below you can see that I have attached <playAudio| to the click macro (click:?playAudio) so that when the image is clicked it will play the audio file. The problem I'm having is that the player can only click the link once and then the link is dead. Is there a way to allow the player to click the link multiple times? I have found a way to do it with html and javascript but I'm trying to avoid this because it requires a lot of script and I will need to attach it to several instances on several different pages. Sorry if this is unclear. Any Help would be greatly appreciated!

<li>(link:"出去")[(goto:"leave")] [<img src="../images/audio.jpg" height=15px; width=15px;>]<playAudio|</li>
<li>[[卧室|bedroom]]</li>
<li>[[厨房|kitchen]]</li>
</ul>

(if: $bigbox's isCarried is true)[你的 (link:"大箱子")[(set:$previousPassage to "livingroom")(goto: "bigbox")]<img src="../images/bigbox.jpg"
height=45px;
width=65px;>]

(if: $backpack's isCarried is true)[你的 (link:"书包")[(set:$previousPassage to "livingroom")(goto: "backpack")]<img src="../images/backpack.jpg"
height=65px;
width=45px;>]

<p style="color:black">Hours Awake: $hoursPlaying </p>

<!--(click:?bagCheck)[(if: itemPickedUp >5)[(print:"你的书包满了")]]
(click:?playAudio)[<script>audio.chuqu.play();</script>]

Viewing all articles
Browse latest Browse all 1844

Trending Articles