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
I would like to request a feature that might be cool to add. There should be a way to make specific choices appear after a certain amount of time, along with other uses. Like, if a player waits for 2 minutes without picking a choice, another appears and they can pick that. I think it would be similar to TURNS_SINCE, but like TIME_SINCE.
The text was updated successfully, but these errors were encountered:
Inkynoob739
changed the title
[Feature request] Time Since (Similar to TURNS_SINCE)
[Feature request] Time Since option for choices (Similar to TURNS_SINCE)
Apr 17, 2023
The Ink interpreter doesn't have any concept of "clock time", and it also doesn't directly control the display of text, so I don't think this feature is a good fit at the language level.
However, it would be easy (and cool!) to implement this on the display side of an application. For example, if you were rendering your choices in HTML+CSS, you could apply a CSS animation that kept the text hidden for the specified amount of time. If it was me, I would implement this using Ink tags, something like:
Then, in (for example) JavaScript, I'd do something like this:
story.currentChoices.forEach( choice => {
let choiceElement = document.createElement("p");
choiceElement.innerHTML = choice.text;
choice.tags?.forEach( tag => {
if (tag.includes("wait") {
choiceElement.className = "wait";
// this class would be defined in the page's CSS, and would have an appropriate CSS animation
}
}
// here you would append choiceElement to the correct place in the document, etc.
}
Hello!
I would like to request a feature that might be cool to add. There should be a way to make specific choices appear after a certain amount of time, along with other uses. Like, if a player waits for 2 minutes without picking a choice, another appears and they can pick that. I think it would be similar to TURNS_SINCE, but like TIME_SINCE.
For example...
(The 00:02:00 would mean 2 minutes)
I think it would be cool to see. Thanks.
The text was updated successfully, but these errors were encountered: