How do you make a piece that is invisible to the opponent at start?
Currently I place the invisible trait on the piece along with a trigger being activated by the piece being placed on the map. I also need a dynamic property preventing this happening every time the piece is moved. It actually works - but unfortunately the messages from the map reveal which piece is placed where, as this message apparently is sent before the piece turns invisible.
This is quickly becoming, what Clint Eastwood would refer to as a ‘cluster f**k’ There surely must be a better way. But how?
The answer for masking is easy - forget about it… Afternote - this is in relation to initially hidden units by the Scenario Developer (see next post for player).
The mask functionality is bound to the password of who turned mask on. Which means if the scenario developer masks a unit, then the players can’t unmask it (unless they have the same password). Essentially, its a security problem…
If intending to simply implement “hidden” (but not “secure hidden”) functionality, I would consider adding a “blank back” layer (which could look exactly like masked) and then allow “flipping” from the initial-hidden state to the revealed state.
The solution with an extra private window is also a kludge. And an even worse one than mine, I think. For this solution to work, it requires the user/player to act in a specific way - this is a no-no in my book
Thx to Korval and jrwatts for your comments and suggestions. Much appreciated.
I wasn’t even aware of the Startup Global Key Command Unfortunately my pieces do not exist at startup. They are markers used for plotting the moves for one or more upcoming turns.
As for the map messages: move messages are not a problem. The piece becomes invisible when placed and the move messages are automatically suppressed for that piece. But the create message is sent before the piece becomes invisible. I can suppress that message by clearing create messages on that map as Korval suggests. Alternatively it should be possible to give the pieces a marker trait and use that to suppress messages from those pieces via a Beanshell script - I haven’t tried it yet. But I will
The essence of the original question was if pieces can be made invisible (or masked) at start in a quick and simple way as it would be silly to implement a kludge, if I had just overlooked a simple solution.
I have now learned that the answer is no…