[messages] [Module Design] How To Identify Invisible Units
spideratj at aol.com
Thu Jun 16 15:00:54 CEST 2016
I don't know of any default graphics, I'm sorry. And maybe this can be
done cleaner than I have it, but here's what I was thinking... so we
aren't using the default invisible trait at all - that's completely
scratched... so for the owning player to control an invisible counter
now, the empty mask (detailed above) becomes your invisible trait.
First though - near the top of the list, underneath Basic Piece - you'd
want your layers (we'll call it: invisibility). Say you want to go with
an asterisk graphic in one corner of the piece to indicate it's
currently hidden. So your base image (the Basic Piece trait) will be
the default image (no need to make a separate layer for it)... you want
"always active" checked and "levels follow expression value"
(expression: invisible), level 1 = 0. You want to two layers. You want
image 1 to be: no image (for not hidden and just the default base
piece), and for image 2 you would add an image of your asterisk or
whatever (...and you may need to fiddle with the offset values near the
top to properly place it over the piece where you want it). So... when
the "invisible" dynamic property is set to 1, the piece will indicate
that it's hidden with that asterisk layer... when it's set to 0, then
only the basic image will show.
Now make your dynamic property (invisible)... it's numeric, 0-1, current
value 0 (you can set it to 1 to place your asterisk properly, but it
should be set to 0 - or visible - at start). New command: no menu
(clear), key command: nowhidden, type: set directly, new value: 1.
Second new command: no menu (clear), key command: cancelhidden, type:
set directly, new value: 0.
Now add 2 Trigger Actions... one with a property match of
ObscuredToOthers=true, watch for: CTRL M (or whatever you have your mask
trait set to), perform: nowhidden... the other with a property match of
ObscuredToOthers!=true, watch for: CTRL M (or whatever you have your
mask trait set to), perform: cancelhidden.
Then your empty mask at the bottom of this traits list.
That should work, I think, but if I got the ObscuredToOthers triggers
firing a step behind, then just switch them around... but I think that
will trigger 'em properly.
You can always add reports too (Such and Such piece is now
Hope this makes sense.
Read this topic online here:
More information about the messages