Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Button to refresh (Only) the current passage.

I'm currently using Harlowe for a narrative that has minigames in various passages. Some of the games need to be able to retried. Is there a way of refreshing the current passage without having to restart the whole twine? (For various reeasons I can't make a retry button within the game) The minigame is in an iframe if this means anything?

Comments

  • Something like the following should work, it uses a (link-repeat: ) macro to call some Javascript that re-assigns the iFrame's src property.
    <iframe id="minigame" src="...."></iframe>
    
    (link-repeat: "retry")[
    	<script>
    		var frame = document.getElementById("minigame");
    		if (frame) {
    			frame.src = frame.src;
    		}
    	</script>
    ]
    
    note: I used indentation and line-breaks to make the above more readable, you may want to remove them in your passage.
  • This worked perfectly! Thanks
Sign In or Register to comment.