You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Question] Including audio clips of dialogue and changing backgrounds per scene #336
I'm a Master's student in the Learning, Design, and Technology program of the Graduate School of Education at Stanford University. For my final project, I'm exploring how to leverage the affordances of game narrative to contextualize language learning. I've decided to do this through Interactive Fiction using Ink. I've already gone through the documentation on Github and written a large part of the story using the basic functions. However, I'm a language learning specialist by trade, and because of my limited understanding of Ink, I have some relatively high-level feasibility questions that I couldn't seem to find in the documentation.
Despite the textual nature of the project, I would like to try to include some more visual and audio elements into the final game that I export to the web or unity.
I'm just interested in knowing if 1) it's possible to use Ink and Unity to associate an audio file with a piece of dialogue from within the story so that when a user clicks on a choice, or when a piece of dialogue is seen, the associated dialogue clip will play? I saw some other postings on adding audio triggers, but because I'm so new to the platform I couldn't tell if that question was what I wanted. 2) Is it possible to add in, and then change, a background image depending on what scene or knot I'm in? And 3) If these things are possible, where in the documentation can I find how to do this?
I'm also interested in knowing if any resources exist (besides this board, of course) that can help me connect to a developer who knows both Ink and Unity? (My program has given me some funds to hire a developer to implement some of the more advanced concepts if need be.)
Hi! Yes, what you want to do is absolutely possible. However, be aware that ink is only meant to handle the story and choice logic, so "external" aspects such as presentation, audio and images have to be handled elsewhere — in Unity or Javascript.
The way to go is usually to add tags next to the content that should trigger an audio sequence / an image:
#image brawndo.jpg
It's full of electrolytes!
...and then in your code, pick up these tags and update the presentation accordingly. There are indeed a few other threads about including voice-over like this, and I know of this open source project that shows image at runtime (although it's not using tags strictly speaking, but the logic is the same).
Hope this helps!
Reacted by slatojc, Jestin VanScoyoc, SkillsCafe and MrVIncentRyan
Activity
y-lohse commentedon Jul 12, 2017
Hi! Yes, what you want to do is absolutely possible. However, be aware that ink is only meant to handle the story and choice logic, so "external" aspects such as presentation, audio and images have to be handled elsewhere — in Unity or Javascript.
The way to go is usually to add tags next to the content that should trigger an audio sequence / an image:
...and then in your code, pick up these tags and update the presentation accordingly. There are indeed a few other threads about including voice-over like this, and I know of this open source project that shows image at runtime (although it's not using tags strictly speaking, but the logic is the same).
Hope this helps!