Currently Online

Latest Posts

Topic: Scenario message boxes which don't pause the game

kaputtnik
Avatar
Joined: 2013-02-18, 20:48
Posts: 1939
Ranking
One Elder of Players
Location: Germany
Posted at: 2020-10-18, 13:25

As far i understand each scenario message box uses story_message_box.cc which pauses the game until the window get closed.

Now i want to have a message box which is shown only for a short time and closes automatically. It contains only a few words, so the need to let the player close the window isn't needed. Such a window should attend the story with some atmosphere. Say one would show a ship in a thunderstorm and the corresponding message box shows "... ARGGHHH ..." or similar. It would be annoying if the player is forced to close this window then.

Is there a possibility to archive this with lua?


Top Quote
Nordfriese
Avatar
Joined: 2017-01-17, 18:07
Posts: 1043
Ranking
One Elder of Players
Location: 0x55555d3a34c0
Posted at: 2020-10-18, 13:34

You could send a message to the player. Making that message a popup, and having your script delete the message and close the message window after some seconds might do the trick.

Making the window non-modal and non-game-pausing should also be possible but this would be some additional C++ implementation effort.


Top Quote
GunChleoc
Avatar
Joined: 2013-10-07, 15:56
Posts: 3268
Ranking
One Elder of Players
Location: RenderedRect
Posted at: 2020-10-19, 18:05

I just happen to have implemented these in https://github.com/widelands/widelands/pull/4369


Busy indexing nil values

Top Quote