# Layers rotate

**URL:** https://forum.vassalengine.org/t/layers-rotate/4882
**Category:** Module Design
**Created:** [April 28, 2012, 8:07am UTC](https://forum.vassalengine.org/t/layers-rotate/4882 "2012-04-28T08:07:12Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![masacrejcr](https://forum.vassalengine.org/letter_avatar_proxy/v4/letter/m/958977/32.png) [@masacrejcr](https://forum.vassalengine.org/u/masacrejcr)
#### Post date: [April 28, 2012, 8:07am UTC](https://forum.vassalengine.org/t/layers-rotate/4882/1 "2012-04-28T08:07:12Z")

</div>

In my module I have counters for player 1, counters for player 2 and counters for land elements. The counters may be in same hex at a time.  
I would like counters for land elements to be always at the bottom of the stacks. In player’s 1 turn, his counters shoul be on top of stacks, while the same with player’s 2 turn.  
To solve that, I made 3 layers in this order land, player 1, player 2. through a layer control, I can rotate the layers, but whatever I do, the land elements layer stay in the middle, above player’s 1 or player’s 2 counters. 👿  
Even though I do not make the land layer, when I put a land counter it goes on the top of the stacks, and when rotate layers, the land counters always intervene.  
Does anyone know how to fix it? 😃

---

<div class="post-metadata">

### Author: ![barbanera](https://forum.vassalengine.org/letter_avatar_proxy/v4/letter/b/85f322/32.png) [@barbanera](https://forum.vassalengine.org/u/barbanera)
#### Post date: [April 28, 2012, 8:32am UTC](https://forum.vassalengine.org/t/layers-rotate/4882/2 "2012-04-28T08:32:28Z")

</div>

That should not happen. In my tests with Game Piece Layers the rotation would work as expected. The only exception I found was with decks, who like to stay on top, but it doesn’t appear to be your case.

Can you post a test module to showcast the problem?

---

<div class="post-metadata">

### Author: ![masacrejcr](https://forum.vassalengine.org/letter_avatar_proxy/v4/letter/m/958977/32.png) [@masacrejcr](https://forum.vassalengine.org/u/masacrejcr)
#### Post date: [April 28, 2012, 9:37am UTC](https://forum.vassalengine.org/t/layers-rotate/4882/3 "2012-04-28T09:37:49Z")

</div>

I have 3 layers:  
Land -------\> Bottom  
Player 1  
Player 2 -----\> Top

When rotate layer order up:  
Player 1 -------\> Bottom  
Player 2  
Land -----\> Top Land is above player’s counters

When rotate layer order down:  
Player 2 -------\> Bottom  
Land  
Player 1 -----\> Top Land is above player’s 2 counters  
This is the problem

---

<div class="post-metadata">

### Author: ![barbanera](https://forum.vassalengine.org/letter_avatar_proxy/v4/letter/b/85f322/32.png) [@barbanera](https://forum.vassalengine.org/u/barbanera)
#### Post date: [April 29, 2012, 7:49am UTC](https://forum.vassalengine.org/t/layers-rotate/4882/4 "2012-04-29T07:49:57Z")

</div>

Well, that is not a bug. Indeed, it is exactly how rotation is supposed to work!

What you want to do (just switching P1 and P2 while leaving Land always on bottom) cannot be achieved by Game Piece Layers controls alone, afaik.

You need to take a more convoluted approach. Here is what I suggest:

1. change name to your levels to Land, Middle, Top (not essential, but just to avoid confusion, see below);

2. make your “Layer” (or “Level”, or whatever is called) attribute on the various pieces a dynamic property, rather than a static marker;

3. add to it command keys CTRL-A and CTRL-B, say, to change its value to “Middle” or “Top”, respectively;

4. use global key commands to send CTRL-A to Player1 pieces and CTRL-B to Player2 pieces, or viceversa, whenever a new player’s turn starts.

---

<div class="post-metadata">

### Author: ![masacrejcr](https://forum.vassalengine.org/letter_avatar_proxy/v4/letter/m/958977/32.png) [@masacrejcr](https://forum.vassalengine.org/u/masacrejcr)
#### Post date: [May 1, 2012, 7:42am UTC](https://forum.vassalengine.org/t/layers-rotate/4882/5 "2012-05-01T07:42:01Z")

</div>

Thank you for your answer. It works perfectly. 😃  
I already knew it was not a bug. I know this is the operation of the rotation of layers. But I did not know how to do what I wanted. 😕  
Your response has been the solution. 😃
