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

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?


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)


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

Support

Forums