Hiding a Single Tile

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
Glen
Posts: 66
Joined: August 20th, 2011, 10:59 pm

Hiding a Single Tile

Post by Glen » May 15th, 2018, 8:22 am

I wanted to edit the 6 player sacrifice survival map to have the sacrifice altar tile hidden from other players(with shroud and fog turned off), so players can't expect whats coming.
The only way I have seen to do this is [place_shroud] but that requires shroud to be turned on for the side. I don't want shroud in general turned on.
I just want this 1 tile to be hidden. I have not seen a method of adding fog or shroud to single tiles. Is there any easy with to edit in a fog or shroud overlay with WML like with [terrain]?

-Glen

User avatar
Ravana
Moderator
Posts: 1841
Joined: January 29th, 2012, 12:49 am
Location: Estonia
Contact:

Re: Hiding a Single Tile

Post by Ravana » May 15th, 2018, 10:50 am

Last I looked that map already has such shroud. https://wiki.wesnoth.org/DirectActionsW ... fy_side.5D can place it.

enclave
Posts: 841
Joined: December 15th, 2007, 8:52 am

Re: Hiding a Single Tile

Post by enclave » May 15th, 2018, 11:21 am

Glen wrote:
May 15th, 2018, 8:22 am
I wanted to edit the 6 player sacrifice survival map to have the sacrifice altar tile hidden from other players(with shroud and fog turned off), so players can't expect whats coming.
The only way I have seen to do this is [place_shroud] but that requires shroud to be turned on for the side. I don't want shroud in general turned on.
I just want this 1 tile to be hidden. I have not seen a method of adding fog or shroud to single tiles. Is there any easy with to edit in a fog or shroud overlay with WML like with [terrain]?

-Glen
There is a shroud fog overlay as terrain, but everyone will see it as shroud and fog, including "not other player", all sides I assume..
The way you want it to be I would use [item] and specify the team_name (https://wiki.wesnoth.org/InterfaceActionsWML#.5Bitem.5D)
But it may make your code much more complicated... depends on many things.. let me know what you think.
I actually just realized that I don't understand what exactly you want.. So just in case it helps try:

Code: Select all

[terrain]
terrain=^_s
x,y=25,25
layer=overlay
[/terrain]
After all you can also make your altar appear later.. you may not even hide it...

User avatar
Glen
Posts: 66
Joined: August 20th, 2011, 10:59 pm

Re: Hiding a Single Tile

Post by Glen » May 15th, 2018, 5:43 pm

Yeah Shroud overlay hides the tile from all sides including the specified player's side, making it not ideal

Anyhow I got it to work as intended by enabling shroud to yes for all [side] and then
[remove_shroud] for all tiles except the tile with the altar's terrain in a 1st turn event.
Was a lot more simple than I thought

Code: Select all

       [event]
	name = turn 1
	[remove_shroud]
	side = 2,3,4,5,6,7
	[not]
		terrain = Chr
	[/not]
	[/remove_shroud]
	[/event]

Post Reply