Is there a Clear Screen option for every player command?

Is there a checkbox some where that needs to be checked or unchecked or a one time simple code string to get all text on the screen to clear itself, minus the most recent command, after the player does or chooses something, so there is no spam stacking on top of each other and making the scroll bar longer and longer. (In other words... not a line of code for scripting to be put in for every single object and or room, just one line of code to rule them all.)

Under Game in the Room Descriptions tab, I see a box to check to "Clear screen when entering a room" and also a box to uncheck to "(not)Display commands entered by the player". That helps a lot in keeping the screen clean.

However I am experimenting with what works best and was wondering with every turn (commands of the player???) is there a way to make all the text disappear, besides the most current text? The player would have to retype Look Room of course and it would re-appear. But if they typed Look Bed, now only the bed description is visible on the main play screen, nothing else preceding would be visible.

If not already implemented and I some how missed it, why is it not available straight out of the box as it were? What are your thoughts on that style of play? Too much, too little, or simply inconsequential? Thank you.


Maybe add the clear screen to the turn script...
I believe the turn script runs after every command/turn...


ClearScreen or Clearscreen
Not sure which.


Thank you, but where would I drop that line of code at exactly? Or how do I program that turn script to do as I want? I am not very good at certain aspects of Quest yet...

Edit: Just found all the documentation for Q. Quite a bit of reading and a real eye opener... O_O. So I shall look through that, but please feel free to answer if you would like. ^_^


Heyo!

You could make it simple and make it a Command.

Add Command
Pattern
clear;clear screen;clearscreen
Name
clear_screen (or whatever name you want to give the command)
Script:
ClearScreen

That way anytime the player wants, they can clear the entire screen of text. I hope that helps!

Anonynn.


If you really want to clear the screen after every turn, you could put it in a turnscript. But turnscripts run after the results of the player's command, so they'd always see a blank screen. You'd want to split up the output, so that after displaying this turn's output, you can hide last turn's.

Off the top of my head, the turnscript would be:

// delete the previous turn's output
if (HasAttribute (game, "prev_turn_section")) {
  HideOutputSection (game.prev_turn_section)
}

// end the section containing the output for the player's last command
EndOutputSection (game.current_turn_section)
game.prev_turn_section = game.current_turn_section

// start a new section for their next command
game.current_turn_section = StartNewOutputSection()

And in the game's start script, before any output that you'd want to be cleared following the first turn, you'd have:

game.current_turn_section = StartNewOutputSection()

Could you insert a “wait for key press” script just before the clear screen turnscript? It’s probably not aesthetically pleasing (maybe it is?) but it should work?


I would like to give you a screenshot. I am not at my computer at the moment.

Do you know about code view? There are two different kinds. You should be able to find where the code is, and code view should be one of the options.


Thanks for the help everyone, even if my eyes are glazing over. >_< I shall have to look deeper into documentation and maybe make a test game.


Alright, I have a few screenshots. (Imgur)

https://i.imgur.com/3mK7PC3.png
https://i.imgur.com/Qt5DJ1D.png


So have you made progress?


This topic is now closed. Topics are closed after 60 days of inactivity.

Support

Forums