Select event selectivity

The place to post your WML questions and answers.

Moderators: Forum Moderators, Developers

Forum rules
  • Please use [code] BBCode tags in your posts for embedding WML snippets.
  • To keep your code readable so that others can easily help you, make sure to indent it following our conventions.
Post Reply
Choicerer
Posts: 238
Joined: April 29th, 2017, 11:37 pm

Select event selectivity

Post by Choicerer » December 11th, 2017, 7:14 pm

Is there ANY way to make a label/printed text/lua message fired from inside a select event visible to all players in multiplayer? I've tried firing another custom event from within the select event, doesn't work.

User avatar
Ravana
Moderator
Posts: 1815
Joined: January 29th, 2012, 12:49 am
Location: Estonia
Contact:

Re: Select event selectivity

Post by Ravana » December 11th, 2017, 7:18 pm

Entire purpose of select event is to do unsynced changes. So if you want something synced happen, you have no reason to use select in the first place.

Choicerer
Posts: 238
Joined: April 29th, 2017, 11:37 pm

Re: Select event selectivity

Post by Choicerer » December 11th, 2017, 7:21 pm

Hmm. Well, it so happens that I do. I want to display a message to all players in the game if a player accesses an info menu while it's their turn. The menu is accessed by clicking a unit. What about wesnoth.show_dialog? I've already had problems with that showing up for everyone if a player selected a right-click menu custom option.

User avatar
Ravana
Moderator
Posts: 1815
Joined: January 29th, 2012, 12:49 am
Location: Estonia
Contact:

Re: Select event selectivity

Post by Ravana » December 11th, 2017, 7:23 pm

Menu option should need delay or redraw call.

Choicerer
Posts: 238
Joined: April 29th, 2017, 11:37 pm

Re: Select event selectivity

Post by Choicerer » December 11th, 2017, 7:27 pm

I'm not sure I understand... You mean that about the second problem?

User avatar
Ravana
Moderator
Posts: 1815
Joined: January 29th, 2012, 12:49 am
Location: Estonia
Contact:

Re: Select event selectivity

Post by Ravana » December 11th, 2017, 7:35 pm

Yes.

Choicerer
Posts: 238
Joined: April 29th, 2017, 11:37 pm

Re: Select event selectivity

Post by Choicerer » December 11th, 2017, 7:41 pm

Ok. And the lua wesnoth.show_dialog function would fail to show the dialog to all players as well if fired from a select event?

User avatar
Ravana
Moderator
Posts: 1815
Joined: January 29th, 2012, 12:49 am
Location: Estonia
Contact:

Re: Select event selectivity

Post by Ravana » December 11th, 2017, 7:52 pm

Yes, select is unsynced.

Choicerer
Posts: 238
Joined: April 29th, 2017, 11:37 pm

Re: Select event selectivity

Post by Choicerer » December 11th, 2017, 7:54 pm

Okay, thank you!

Post Reply