Usage of [terrain_mask]?

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
User avatar
Legolad
Posts: 14
Joined: March 18th, 2008, 1:32 am

Usage of [terrain_mask]?

Post by Legolad »

I'm trying to create a simple 2-p scenario in which the players are on opposite sides of a chasm. During gameplay, bridges will open across the chasm. For some reason, the bridge code is not working. I use [terrain_mask] to create a bridge at 4,8 on turn 1 ( to make sure it works ), but nothing happens. Here's my [terrain_mask] event:

Code: Select all

[event]
	name=turn 1
	[terrain_mask]
	x,y=4,8
	mask="border_size=1
usage=map

Aa"
	[rule]
   	use_old=no
	[/rule]
	[/terrain_mask]
[/event]
Am I doing something wrong here?
Once upon a time,
There was an Elven Avenger who wondered where exactly that phrase came from, and whether time has physical manifestations that can be sat upon ( or down on, depending on size ).
AI
Developer
Posts: 2396
Joined: January 31st, 2008, 8:38 pm

Re: Usage of [terrain_mask]?

Post by AI »

I believe "turn 1" is an invalid event. Use "start" or "turn 2" or later.
User avatar
zookeeper
WML Wizard
Posts: 9742
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Re: Usage of [terrain_mask]?

Post by zookeeper »

Indeed.
WML Reference wrote:turn X: (for X some number) this event triggers at the start of turn X. X cannot be 1.
Feel free to post a feature request at gna asking to remove that limitation.
Dret
Posts: 79
Joined: June 13th, 2007, 11:06 pm
Contact:

Re: Usage of [terrain_mask]?

Post by Dret »

I add a question:

If I have a map like this:

Ww,Ww,Ww,Gs,Gs,Gs,Gs,Gs,Gs,Ww,Ww,Ww
Ww,Ww,Ww,Gs,Gs,Gs,Gs,Gs,Gs,Ww,Ww,Ww
Ww,Ww,Ww,Gs,Gs,Gs,Gs,Gs,Gs,Ww,Ww,Ww
Gs,Gs,Gs,Gs,Gs,Gs,Gs,Gs,Gs,Gs,Gs,Gs
Gs,Gs,Gs,Gs,Gs,Gs,Gs,Gs,Gs,Gs,Gs,Gs
Gs,Gs,Gs,Gs,Gs,Gs,Gs,Gs,Gs,Gs,Gs,Gs
Ww,Ww,Ww,Gs,Gs,Gs,Gs,Gs,Gs,Ww,Ww,Ww
Ww,Ww,Ww,Gs,Gs,Gs,Gs,Gs,Gs,Ww,Ww,Ww
Ww,Ww,Ww,Gs,Gs,Gs,Gs,Gs,Gs,Ww,Ww,Ww

Is possible to put "Fog" only on "Ww" hexes, usig a [terrain_mask] Tag that modify "Ww" terrain with "_f" or there's another way to do?

If is possible to do that, how i have to set "fog" attribute in [side] Tag..?? (yes or no?)

Thanks... Bye!
Rhuvaen
Inactive Developer
Posts: 1272
Joined: August 27th, 2004, 8:05 am
Location: Berlin, Germany

Re: Usage of [terrain_mask]?

Post by Rhuvaen »

It's not possible to place fog with terrain_mask.
User avatar
DEATH_is_undead
Posts: 960
Joined: March 4th, 2007, 3:00 pm
Location: Northern United States

Re: Usage of [terrain_mask]?

Post by DEATH_is_undead »

Rhuvaen wrote:It's not possible to place fog with terrain_mask.
Or shroud, read the terrain WML wiki.
3P MP Scenario - Great Dwarves Escape
The best way to learn is to follow. In order to learn WML, you have to follow other's work, and check their codes.
User avatar
Legolad
Posts: 14
Joined: March 18th, 2008, 1:32 am

Re: Usage of [terrain_mask]?

Post by Legolad »

Cool. I didn't know about the "turn 1" limitation. TYVM!
Once upon a time,
There was an Elven Avenger who wondered where exactly that phrase came from, and whether time has physical manifestations that can be sat upon ( or down on, depending on size ).
KingdomAmericaCMG
Posts: 172
Joined: September 19th, 2008, 10:08 pm

Re: Usage of [terrain_mask]?

Post by KingdomAmericaCMG »

i think if you want it on turn 1 use prestart
opensourcejunkie
Posts: 547
Joined: August 11th, 2008, 3:19 pm

Re: Usage of [terrain_mask]?

Post by opensourcejunkie »

well, if you're making it happen on multiple turns throughout the scenario, it might be useful to use a single "new turn" event, and then just use a bunch of if statements to determine which turn it is.
what if the Bible's claims about Christ depicted accurate, verifiable history? given some research, you might be surprised at the evidence...
Post Reply