Select event selectivity

The place to post your WML questions and answers.

Moderator: Forum Moderators

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 »

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
Forum Moderator
Posts: 2934
Joined: January 29th, 2012, 12:49 am
Location: Estonia
Contact:

Re: Select event selectivity

Post by Ravana »

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 »

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
Forum Moderator
Posts: 2934
Joined: January 29th, 2012, 12:49 am
Location: Estonia
Contact:

Re: Select event selectivity

Post by Ravana »

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 »

I'm not sure I understand... You mean that about the second problem?
User avatar
Ravana
Forum Moderator
Posts: 2934
Joined: January 29th, 2012, 12:49 am
Location: Estonia
Contact:

Re: Select event selectivity

Post by Ravana »

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

Re: Select event selectivity

Post by Choicerer »

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
Forum Moderator
Posts: 2934
Joined: January 29th, 2012, 12:49 am
Location: Estonia
Contact:

Re: Select event selectivity

Post by Ravana »

Yes, select is unsynced.
Choicerer
Posts: 238
Joined: April 29th, 2017, 11:37 pm

Re: Select event selectivity

Post by Choicerer »

Okay, thank you!
Post Reply