Is this a bug?

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
Atreides
Posts: 1039
Joined: March 30th, 2019, 10:38 pm
Location: On the 2nd story of the centre village of Merwuerdigliebe turning the lights on and off

Is this a bug?

Post by Atreides »

Code: Select all

#define PLACE_SAND_WALL UNIT X Y
    [item]
        x={X}
        y={Y}
        halo="walls/wall-${UNIT}.variables.wall_dir|.png"
        visible_in_fog=no
    [/item]
#enddef
Item is still visible in fog. This is the only code that places the item.
User avatar
Celtic_Minstrel
Developer
Posts: 2158
Joined: August 3rd, 2012, 11:26 pm
Location: Canada
Contact:

Re: Is this a bug?

Post by Celtic_Minstrel »

It does sound like a bug. Did you place {PLACE_SAND_WALL unit x y} in [scenario] or in [event]? Does it make any difference?
Author of The Black Cross of Aleron campaign and Default++ era.
Former maintainer of Steelhive.
User avatar
Atreides
Posts: 1039
Joined: March 30th, 2019, 10:38 pm
Location: On the 2nd story of the centre village of Merwuerdigliebe turning the lights on and off

Re: Is this a bug?

Post by Atreides »

Celtic_Minstrel wrote: February 2nd, 2023, 7:18 am It does sound like a bug. Did you place {PLACE_SAND_WALL unit x y} in [scenario] or in [event]? Does it make any difference?
Oh it's in events. I have no scenarios to test it in though. It is part of an ability for a unit. When the unit moves or is placed this is run to place a graphic in its hex. I can see the sandwall for enemy units even through the fog of war, a bit of a problem... : )
User avatar
Celtic_Minstrel
Developer
Posts: 2158
Joined: August 3rd, 2012, 11:26 pm
Location: Canada
Contact:

Re: Is this a bug?

Post by Celtic_Minstrel »

Does it show through fog if you use image= instead of halo=? It might be that item halos don't support hiding under fog…
Author of The Black Cross of Aleron campaign and Default++ era.
Former maintainer of Steelhive.
User avatar
Atreides
Posts: 1039
Joined: March 30th, 2019, 10:38 pm
Location: On the 2nd story of the centre village of Merwuerdigliebe turning the lights on and off

Re: Is this a bug?

Post by Atreides »

Celtic_Minstrel wrote: February 3rd, 2023, 4:28 am Does it show through fog if you use image= instead of halo=? It might be that item halos don't support hiding under fog…
Bingo! Images are hidden while halos oddly are not. Strange that a halo should be visible though.

Lucky for me I can just sub image for halo (it does place it underneath instead of overtop but that's probably more realistic seeing as a wall of sand would be underfoot : )
Post Reply