Action/Command to create a piece from Palette

Hi There,

It says : The Game Piece Palette is a panel which contains Game Pieces that the players may drag to the playing area during a game.

Can I create a command/action that wouild do the same thing ? I’d like to create some of these pieces, and position them randomly. As the number can be high, and Pieces Palette are unlimited, I’d like to use this instead of creating an at start stack within a deck.

Any lead ?

Does Place Marker do what you want?

Hey ! I guess it will ! I never thought of this as a marker, but you’re right ! That’s exactly what I need !

That’s great.
Now I’d like to use the action to place this marker on a random position in the current zone.
But the Place Marker allows for Horizontal and Vertical offsets as fixed integers.
I can’t use a random function, or even a $anothertrait$ I could get from a calculated property.

I don’t know it this is a bug, but each time I set a non numeric value in these offsets, it’s set back to 0 :frowning:

Any idea ?

You can add a “Moved Fixed Distance” trait to the new piece; it accepts Beanshell expressions for the amount to move. Just trigger it from the “Keystroke to apply after placement” of the Place Marker trait.

Thx. That’s what I did. Move Fixed Distance + Keystroke to apply after …
I just wonder why the Place Marker does not accept Beanshell expressions as well.
Never mind. I have all what I needed to move on for a few days ;)