Page 1 of 1

flushing a message to the text area before a turn is done

PostPosted: Wednesday, 22nd June 2016, 17:35
by jeremygurr
I'm trying to output a message when autotravel begins, because sometimes it is slow and the player doesn't always know something is happening. The message displays just fine, but it doesn't show up until the auto-travel is over, which defeats the purpose of course.

I've tried about a dozen different things, but can't seem to get it right. I've looked into how prompts work, since prompts always appear immediately even in the middle of a turn. I've even tried to send the message through the prompt channel, and even that doesn't work.

Here's the mess I've currently have in place, which of course doesn't work.

redraw_screen();
clear_messages();
mprf("Travelling...");
msgwin_got_input();
msgwin_new_cmd(true);
display_message_window();

Anyone know what I'm doing wrong?

Re: flushing a message to the text area before a turn is don

PostPosted: Friday, 24th June 2016, 12:43
by wheals
jeremygurr wrote: msgwin_new_cmd(true);

How did you get this to compile? msgwin_new_cmd doesn't take any arguments...

Re: flushing a message to the text area before a turn is don

PostPosted: Saturday, 25th June 2016, 06:19
by jeremygurr
I added the argument to allow bypassing some prompt-recognition code. Of course it didn't accomplish my purpose so it is pointless. Surely there's a simple way to do this?