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


Questions, Explanations, Howtos

Halls Hopper

Posts: 74

Joined: Sunday, 21st February 2016, 14:55

Post Wednesday, 22nd June 2016, 17:35

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

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?

Dungeon Master

Posts: 634

Joined: Sunday, 22nd September 2013, 14:46

Post Friday, 24th June 2016, 12:43

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

jeremygurr wrote: msgwin_new_cmd(true);

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

Halls Hopper

Posts: 74

Joined: Sunday, 21st February 2016, 14:55

Post Saturday, 25th June 2016, 06:19

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

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?

Return to Coding

Who is online

Users browsing this forum: No registered users and 8 guests

cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.