Switching on/off text labels

I’m looking for a way to turn on/off text labels on a game piece. I don’t want the label to be always visible , but only when a given property is true or a keystroke is fired.
I tried to mask the text label with a layer, but it didn’t work because the text label is always displayed over the masking layer.

There is a way to solve this problem?

Thank you.


I don’t know how effective the mask would be, but to mask the text label, the mask trait must be below it.

However a better way of doing this would be to set the text label to a property, dynamic or global. And then when you want to hide it, set the property value directly as blank, nothing, zip.

Then when you want to reveal it, set the property directly back to its original text.

Another way would be to not use text labels, but instead use a layer trait. Your text will have to be an image file made in an image editor, then added to the layer which can then be toggled on and off by key command.

Many thanks for your reply. Sorry to be late, but I’ve been very busy in the meantime.

I cannot use layers because the dynamic property I use is numeric with a range from 0 to 1000.

In any event, I finally found a way to avoid to see an unwanted “0” on the counter.

I simply delete the 0 as minimum value in the set box of the property, leaving a blank space. It worked!