ephread / inkgd

Implementation of inkle's Ink in pure GDScript for Godot, with editor support.
MIT License
317 stars 33 forks source link

Best way to implement multiple ink stories? #23

Closed mcoorlim closed 4 years ago

mcoorlim commented 4 years ago

Hi, I'm very new to gdscript, and I've been using your implementation of The Intercept as a guide to building my own ink runner node. I've got something working, I'm happy so far, inkgd has been a great help.

I'd like to link self-contained ink stories together into a sort-of anthology. How would I go about having the runner stop the current story and load a new .json? Or would it be easier/a better practice to instance a new ink runner node each time?

Thanks!

ephread commented 4 years ago

Hi @mcoorlim,

I've got something working, I'm happy so far, inkgd has been a great help.

I glad it’s been useful!

I'd like to link self-contained ink stories together into a sort-of anthology. How would I go about having the runner stop the current story and load a new .json? Or would it be easier/a better practice to instance a new ink runner node each time?

I think either way is fine, although keeping the same ink runner is probably easier. Assuming you don’t need to keep any references to the previous stories in the anthology, you can just replace the content of story with a new Story, clear the screen and call continue() to get the new content.

ink stories are idle until queried / continued so you can override them at any time.

mcoorlim commented 4 years ago

Works like a charm, thanks.