Hi,
I’m using the Harlowe Audio Library to add audio into my game.
I’ve got it working fine in terms of the audio. I have managed to get the audio to perform actions when selecting appropriate buttons.
Currently I have my track file playing when the player selects the ‘play’ button which is then replaced by a ‘pause’ button before going back to ‘play’ when selected.
I can get this cycle to rerun twice using (rerun:) but after that it stops replacing ‘play’ with ‘pause’. I’m assuming I need to add something to my (rerun:) code for the Named Hook but I’m a bit stuck on where to go from here. I’d assume I need to create a loop but not sure how to go about that.
Is anyone able to help? Or is this something not possible in Harlowe?
(I’ve just used a random audio file I already had for now whilst I test everything out)
This is method one that I’ve tried that sort of works:
The code replaces a |status> hook message in place of controlling an audio file. However, if you click the buttons, the status reflects the state of what the audio file should be doing.
Note: Notice that the pause hook is initially hidden → |pause) and not |pause>
Let me know if this helps and if you have any other questions.
Note: TRACK NAME is the name of the required track you want the audio playing that you’ve set up in the hal.config passage.
I left the status Named Hook blank as there is no IDLE within HAL but I guess you could put the preload macro here if you haven’t set audio to preload.