I have a grid where each position will have an “invisible” card.
And I will have a deck of cards at the side.
I would like to be able to right-click on an “empty” space on the grid (which is actually a “transparent card” and select an option to “draw a card”, and then this action would draw a card from the deck and place on top of the transparent card (or replace).
I know I can trigger commands on the transparent card to trigger this but, how can I make it draw a card from the deck and replace the transparent card with it (to place it on top)?
Many thanks in advance.
I’m adding a couple comments to JRWatts’ reply because I do what you ask for all the time.
JR proposed using “send to location” via (x,y) pixel coordinates, but you could also use send-to-region or send-to-another-piece. For the sake of example, suppose we have 8 invisible cards I will call “locators.”
If they are stationary, we could define 8 map regions, “R0” to “R7”. Each card would have 8 send-to region commands (goToR0, goToR1, …). When someone clicked on locator 3, it would send GKC goToR3 to the cards. (The GKC form would be send-to-region, and the region would be R0 to R7 depending on the command, goToR0 to goToR7. You would also need to specify DeckName==“cards” or whatever you called the deck, and fixed number of cards = 1.)
A second way would be send-to-another-piece. In this case, each locator would have a unique marker property, e.g. locator=0 to locator=7. Again, each card would have goTo commands as above. Each command would send to the piece identified by the locator property. The advantage to this approach is the locators don’t need to be stationary.
Regarding stacking, this should not be a worry if you use map layers. I’d define layers like top, cards, locators with locators being on the bottom and the cards being in the cards layer. (If you don’t know what I’m talking about, ask.) This both ensures that cards will always be rendered above locators, and cards and locators will never stack because they are on different layers.
hmmm makes sense. I thought it would be something lie that just didn’t know about the “send-to-another-piece”.
I will give it a try and ping you guys again if I get it working or if I get more issues.
Thanks for your time and explanation
hmmm I have a grid already in place where the tiles are supposed to be placed (since I was doing manualy before)
if there a way to use the grid itself for the mechanic you mentioned above?
I actually use Action buttons for this functionality. When I click the button it executes a trigger that draws a card from the deck on to the top of the button (use Game Piece layers and Does not Stack/Move) to keep button on bottom.
If it is for a one time use only I then destroy the button, else you can leave it in place for reuse whenever it is no longer covered by a card to draw again - see pic for example
BTW, you can use the button to help snap your piece to the grid (should be evident in pic this is what I am doing)
ok I was able to do it and it worked just fine, thank you!
I noticed also that there is an option to send to a “grid location” that could also work. But since I have to have the piece to trigger the action to send the ard there… There’s not much benefit.
Now … this was a paint to do … 49 tiles on the board xD