Place Fog

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
serclino
Posts: 40
Joined: May 18th, 2018, 9:54 pm

Place Fog

Post by serclino »

Hi, how can i place fog on the map to specific location (in the middle of scenario)? I didn't find any equivalent for [place_shroud].

Thank you.
User avatar
octalot
General Code Maintainer
Posts: 786
Joined: July 17th, 2010, 7:40 pm
Location: Austria

Re: Place Fog

Post by octalot »

As far as I know, placing just specific locations of fog isn't supported. What is supported is resetting the fog (putting fog everywhere) and then clearing only the areas that are currently visible - for a start-of-turn event that's not too bad, but if the player has already moved this turn it may be too much fog.

Code: Select all

    # Sir Ruddry has ridden in, alone, on the opposite side of the map to the player. We've had some dialogue, and the fog
    # around him cleared while he was speaking, but that side of the map is going to be fogged again.
    # This event fires immediately after our leader says that he hears a noise, so the screen will have scrolled away from Sir Ruddry.
    [event]
        name=exit_sir_ruddry

        [kill]
            id=Sir Ruddry
        [/kill]

        [reset_fog]
            [filter_side]
                side=1
            [/filter_side]
            reset_view=yes
        [/reset_fog]
        [redraw]
            side=1
            clear_shroud=yes
        [/redraw]
    [/event]
serclino
Posts: 40
Joined: May 18th, 2018, 9:54 pm

Re: Place Fog

Post by serclino »

octalot: Thanks, you helped. I solved it with placing fog over the whole map.
Post Reply