inkle / ink

inkle's open source scripting language for writing interactive narrative.
http://www.inklestudios.com/ink
MIT License
4.12k stars 492 forks source link

Question: Using Glue in Choices #197

Open Chernobog666 opened 8 years ago

Chernobog666 commented 8 years ago

Greetings and salutations. First of all, my hat goes off to the people from Inkle for granting us this amazing tool to play with.

Now, onto the question. How does one glue the result of a choice with a previous line of text? Here's an example:

I looked at the fire,
        *   [...knowing not what to expect] knowing not what to expect.
        *   [...expecting the worse]expecting the worse. 
Obviously it produces the following text with a line break:
I looked at the fire,
knowing not what to expect.

So how do I glue the text together so it produces:
I looked at the fire, knowing not what to expect.

I've tried placing the glue before, after and inside the choice text; diverting to another knot or gather point, but nothing seems to work. The only time it actually does work, is in case of a fallback choice (with no text before or inside the []), like this:

I looked at the fire, <>
        *   [] knowing not what to expect.

There is probably something simple I'm overlooking, since there is no similar issue, either opened or closed on the subject.

Thanks in advance.

joethephish commented 8 years ago

Hrm. This is something which is specific to the renderer, i.e. the game side. e.g. if you're using Unity you need to customise the class that deals with the Ink.Runtime.Story instance, or you need to customise the web template that comes out of Inky. On 80 Days was used an internally ellipsis syntax, e.g.:

I looked at the fire,
        *   ...knowing not what to expect.

...and the game would automatically join the text on if it started with the ellipsis, rather than starting a new paragraph.

Having said that, your example using glue above could potentially be made to work with our existing players (Unity player window, Inky + export, inklecate command line). I'm afraid though that it wouldn't be a priority for us right now :-/

Chernobog666 commented 8 years ago

Thanks for the response.

I'm still messing around with Ink in general, but will keep that in mind when working with the renderer or exporting to web. I remembered 80 days had similar choices, that's why I was interested in replicating them in Inky.

It occurred to me this was done using something else, rather than pure Ink, but then I got more confused when the glue worked for fallback choices. I presumed I was doing something wrong ;)

Thanks anyway!