How to implement player specific interactions

Hi all,

I have a game with a common board and each player have their own table in a separate player window.

I want to

  1. Select something on the main map, then right click on it to select a “bring it home” action
  2. Now If I am the red player, I want it to move to the red tableau, but I am a yellow player, the same action should send the same piece to the yellow tableau.

Any hints on how to go about this (or if even possible) appreciated…

You need 1 trigger action for the menu item, then 1 more for each player. The first trigger action has a menu command (“bring it home”) and a key command (for example, BringItHome). The other trigger actions each look for BringItHome, with only trigger when “PlayerSide=”, leaving out the quotes, (or {PlayerSide==""} if you prefer BeanShell syntax), where is the color for that specific player, then triggers BringItTo, again, replacing with the actual color.
You then need a Send To Location trait for each color, triggered on BringItTo, sending it to the appropriate tableau.

Actually, there’s a much simpler way to do this, if your tableaus are named correctly; simply add a single Send To Location trait with the menu command “bring it home”, and the destination map set to “$PlayerColor$ tableau”, without the quotes (assuming the red tableau is named “Red tableau”, for instance), and similar with the destination board. If you prefer BeanShell syntax, the destination map would be {PlayerColor + " tableau"}.

Many thanks, will try these…