To Clear the Screen or not to Clear the Screen, that is the question #1471
Replies: 2 comments
-
You could, but you'd have to do all that using HTML, CSS, and JS, coding all that yourself. In example, to have a way to delete certain bits of text each turn, you could use HTML elements with a class, and use a turn script to hide those bits of text using JavaScript.
Then, create a turn script (and be sure it is enabled): JS.eval ("$('.hide-me').hide();") There is also a text processor trick in Quest you might find helpful. Anywhere in the text, we can use I usually wrap the line breaks in it, too, like:
|
Beta Was this translation helpful? Give feedback.
-
I just discovered an old trick to create an output section to hide text whenever we please, using Quest functions. Here's an example script. (I tested this in a "before entering room for the first time" script, but we can do this in whatever script(s) we want.) // Start a new output section
// The function will return the name of the section
// We need to store the section name as an attribute, for later use
// We'll store this data in a "section_to_delete" attribute on the 'lounge' object
lounge.section_to_delete = StartNewOutputSection()
// Now, we can print whatever we want to be removed
msg ("This message will self-destruct!")
// Whenever we are done printing text, end the output section
// (We are using the attribute we created to store the section name)
EndOutputSection (lounge.section_to_delete)
// We want this text gone after this turn
// Use a turn timeout, set to 1 turn
SetTurnTimeout (1) {
// Hide the output section, using the attribute we created for this purpose
HideOutputSection (lounge.section_to_delete)
} Important Any text that prints in between the call to to |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Testing my game, I see blocks of text, which do need to occur to progress the story (there is no way around this for authenticity sake). However, a part of me feels it would look better if it disappeared, as in Clear the Screen script. While a part of me thinks it would be helpful to stay. But it just looks odd with so much text cluttering.
Is there a middle ground to make what ever most recently pops up show at the top, but you can always scroll up past that to see previous screens/text? At times I may very well want to clear the screen entirely, but looking for a balance and suggestions. Thank you.
Beta Was this translation helpful? Give feedback.
All reactions