Quantcast
Channel: The Battle for Wesnoth Forums
Viewing all articles
Browse latest Browse all 2124

WML Workshop • Re: How to apply [terrain_graphics] to a part of the map?

$
0
0
I'll put everything here!

I suppose you have the snowfall images... so...

Code:

#define SNOWFALL    [terrain_graphics]        map="1*"        [tile]            pos=1            set_flag=snowfall            no_flag=snowfall        [/tile]        [image]            position=horizontal            layer=1000            name=weather/blank.png            [variant]                tod=snowy_dawn,snowy_morning,snowy_afternoon,snowy_dusk,snowy_first_watch,snowy_second_watch                name=weather/snow/snow-[1~6].png:80            [/variant]        [/image]    [/terrain_graphics]#enddef
You can create this macro and define at the top of the scenario.

Code:

[scenario]    {SNOWFALL}[/scenario]
Or put everything! Just erase the #define and #enddef

Now... the important thing: the TOD
It's the schedule! If you're using the normal schedule, put their id in the TOD

Code:

tod=dawn,morning,afternoon,dusk,first_watch,second_watch
Then you just need to create a time area to the cave. It's easier to use the type of the terrain, so it'll be underground only on the cave terrains

Code:

[time_area]        id=cave        {UNDERGROUND}        terrain=Xu,Ur,Uu,Uh,Tb^Tf[/time_area]
It's just an example: Xu,Ur,Uu,Uh,Tb^Tf are cave terrains.

It won't snow in the cave, because you put the schedules when it should snow in the TOD. Don't forget to put the right path to the snowfall image files.
Like This!

A lot of add-ons has these images - it's 6

Statistics: Posted by Saizo-Luz — Today, 2:18 pm



Viewing all articles
Browse latest Browse all 2124

Trending Articles