Is there a way to move the window along with printing lines like msg("") so the player doesn't have to scroll down themselves?

Fyrdraca
23 Dec 2019, 01:50

When you enter a command, the screen automatically bumps down to show it. However, if I have a timer for, say, ambience, it doesn't automatically bump down. Is there a way to fix this?


mrangel
23 Dec 2019, 11:01

There's a function JS.scrollToEnd() which probably does what you want.

However, I'd be careful about overusing it, because the automatic scrolling can sometimes cause problems on mobile devices.
(I usually prefer to disable that function in my games if they're running on mobile, by adding something like JS.eval("$(function (){ if (platform == 'mobile') {addTextAndScroll = addText; })};") to my UI initialisation)