Hi there!
Currently I'm setting up text to automatically read out on a timed delay. However, it occurs to me that waiting for text to pop up may be frustrating for faster readers, who may prefer to see the whole passage just pop up instantly.
I'm using the <<timed>> macro with the actual time as a variable which the player will be able to set to either 1s, 2s or 3s. However, there's no way to set it to 0 or an effective 0. I think the minimum is 40ms, but that causes a very unflattering visual effect of text appearing in a downwards swipe, not all of it to pop up at once. (Like it would if there was no <<timed>> macro stalling its appearance).
Currently I've got this in the CSS
This in my StoryInit
And I'm doing something like this:
It looks pretty dramatic for certain passages, which is why I really want to find a way to have my cake and eat it too.
I considered wrapping the whole thing in an <<if>> statement and then having an <<else>> version with the same thing above, minus the timed effects, but a guy I learned code off once said "if you're starting to duplicate things, you're probably doing it wrong."
Tl;dr: I'm looking for a way in Sugarcube 2 that I can insert a timed macro to slowly read text, but with the option to remove its effects entirely so people who want to read all the text right away can do that.
Currently I'm setting up text to automatically read out on a timed delay. However, it occurs to me that waiting for text to pop up may be frustrating for faster readers, who may prefer to see the whole passage just pop up instantly.
I'm using the <<timed>> macro with the actual time as a variable which the player will be able to set to either 1s, 2s or 3s. However, there's no way to set it to 0 or an effective 0. I think the minimum is 40ms, but that causes a very unflattering visual effect of text appearing in a downwards swipe, not all of it to pop up at once. (Like it would if there was no <<timed>> macro stalling its appearance).
Currently I've got this in the CSS
.macro-timed-insert {
transition-duration: 1s;
}
This in my StoryInit
<if $textspeed is "">><<set $textSpeed to "3s">>
And I'm doing something like this:
First non-delayed sentence.
<<timed $textSpeed transition>>
Second sentence.
<<next>>
Third sentence.
<<next>>
Fourth Sentence
[[Next|Some Passage]]
<</timed>>
It looks pretty dramatic for certain passages, which is why I really want to find a way to have my cake and eat it too.
I considered wrapping the whole thing in an <<if>> statement and then having an <<else>> version with the same thing above, minus the timed effects, but a guy I learned code off once said "if you're starting to duplicate things, you're probably doing it wrong."
Tl;dr: I'm looking for a way in Sugarcube 2 that I can insert a timed macro to slowly read text, but with the option to remove its effects entirely so people who want to read all the text right away can do that.