So, my character (Jaks) is having an online conversation with his handler Wilson on instant messenger. What I want to do is have him say something, then after 2 seconds it says "Wilson is typing...", then after 5 seconds it's supposed to delete "Wilson is typing..." and replace it with Wilson's response. Now, what I'm having trouble with is replacing "Wilson is typing...". I've tried replacing it, deleting, setting a variable to it, etc. Nothing seems to work.
As far as I know, Quest does not have something similar to
A way to move up one line... (Could Quest msg(backspace) to back up the curser clearing text as it goes??? I'll check shortly)
You could also just clear the screen and reprint it with Wilson's message instead of "Wilson is typing..."
But the blank and reprint may be noticeable...
OR... just don't worry about it, and print Wilson's response... It may not be what you are after, but it could work.
as far as I know, there's no way to target displayed text (maybe in the internal coding of quest it gets stored/saved, which then would allow for you to manipulate it), all you can do is to delete/clear/remove the displayed text (via the built-in 'ClearScreen' Script/Function), and display/re-display what you want (this happens so fast that the person playing won't notice that this is what you're doing). Now, the display/re-display of what you want, can be handled, in some advanced methods, depending on how complex you want/need the displayment/re-displayment to be, for what you want/need to do.
This is definitely possible. I no experience of doing it, and so I am guessing how to use these functions; you will need to experiment. However, I think you start and end the section you want to hide like this:
name = StartNewOutputSection() msg("He is typing") EndOutputSection(name)
And hide it like this:
For something like that, I'd probably make a JS function to handle it. Have a function which displays one text and changes it to another after a few seconds, so you only need to send data to the browser once.
(if you're allowing the player to enter commands while the other guy is still typing, I think you should be able to put extra keys into the metadata object to indicate the fact. This would reduce the possible effects of lag when playing online)