Website links in ink game


(Caleb Wilson) #1

Hmm, I’m trying to make a link to an external website from my ink game. I feel like I must be missing something simple, but I can’t figure out how.

Thanks for any help!


(Andrew Plotkin) #2

I believe the idea is that your game (Unity or whatever) is responsible for presentation. Ink just generates text output. You could include some kind of tag formatting in the output, and then scan that for strings to display as hyperlinks.


(Caleb Wilson) #3

So far I’m not messing with unity – I have inky compiling the game as a website. I guess what I need to do is open the javascript portion of the output and put the link directly in there, but there are unknown unknowns, as they say, and I’m not sure if that makes sense/is bad/is good/how to do it, anyway. (I know nothing about javascript.)


#4

It looks to me as if you can just put HTML directly in your ink, and if you’re compiling for web it will show up. The only thing is that // is a comment marker in Ink, so you’ll need to put a backslash before the second slash so it isn’t detected as a comment. So the following works for me (note the backslash near the beginning of the URL):

Check out the <a href="https:/\/www.intfiction.org/forum/">Interactive Fiction Forums</a>.

Edit: And…sorry for the necrobump: didn’t notice the date…