Restricting event messages to side(s)

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
User avatar
Ironcladkitty
Posts: 10
Joined: June 10th, 2014, 6:38 pm

Restricting event messages to side(s)

Post by Ironcladkitty » September 3rd, 2017, 12:58 am

Hi!

In a little scenario I'm making, I have 5 sides. Each of these 5 sides starts with its own 'intro', a short briefing/conversation between units.

Unfortunately, I cannot make it so that each side views only its own intro - all 5 intros are shown for all 5 players. How can I enforce the game to show Side 1 (and so on) the intro for Side 1 but do not display the intros for other sides?

I've tried using various filters, but nothing is working so far...
All my love for Wesnoth! (And Dwarf Fortress, and Fire Emblem, and...)
===
[acronym=Hatkitty recommends!]~♪♫~ o/,, %o ♂o √o φo ♂o %o ~♫♪~[/acronym]

User avatar
doofus-01
Art Contributor
Posts: 3671
Joined: January 6th, 2008, 9:27 pm
Location: USA, the civilized part.

Re: Restricting event messages to side(s)

Post by doofus-01 » September 3rd, 2017, 1:13 am

I don't know if it is possible or not, I've never tried, but [story] and [part] supposedly take filters, so it might be possible if you can determine the viewing side somehow.

What have you tried so far?
BfW 1.12 supported, but active development only for BfW 1.13/1.14: Bad Moon Rising | Trinity | Archaic Era |
| Abandoned: Tales of the Setting Sun
GitHub link for these projects

User avatar
ForestDragon
Forum Regular
Posts: 1488
Joined: March 6th, 2014, 1:32 pm

Re: Restricting event messages to side(s)

Post by ForestDragon » September 3rd, 2017, 5:03 am

I think this should work for you: put this in the 'prestart' event:

Code: Select all

    [color_adjust]
        red=-512
        green=-512
        blue=-512
    [/color_adjust]
then make multiple messages, each with 'side_for=insert your side number here'. this approach will make images show at the bottom, though, instead of on the top.
Co-creator of Era of Magic
Creator of Tale of Alan (1.12 abandoned),The Golden Age (1.12/1.13, abandoned),XP Bank (1.14),Alliances Mod(1.14), with a large add-on in development
"Real life is like a hyper-realistic VR game, but with permadeath and boring gameplay"

User avatar
Ironcladkitty
Posts: 10
Joined: June 10th, 2014, 6:38 pm

Re: Restricting event messages to side(s)

Post by Ironcladkitty » September 3rd, 2017, 8:00 am

D'oh, side_for= is just what I needed. Thanks for help guys!
All my love for Wesnoth! (And Dwarf Fortress, and Fire Emblem, and...)
===
[acronym=Hatkitty recommends!]~♪♫~ o/,, %o ♂o √o φo ♂o %o ~♫♪~[/acronym]

Post Reply