# How do set attachment property / select by attachment work?

**URL:** https://forum.vassalengine.org/t/how-do-set-attachment-property-select-by-attachment-work/77795
**Category:** Module Design
**Tags:** v3\_7
**Created:** [September 4, 2023, 7:06pm UTC](https://forum.vassalengine.org/t/how-do-set-attachment-property-select-by-attachment-work/77795 "2023-09-04T19:06:25Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Nico165](https://forum.vassalengine.org/user_avatar/forum.vassalengine.org/nico165/32/8129_2.png) [@Nico165](https://forum.vassalengine.org/u/Nico165)
#### Post date: [September 4, 2023, 7:06pm UTC](https://forum.vassalengine.org/t/how-do-set-attachment-property-select-by-attachment-work/77795/1 "2023-09-04T19:06:25Z")

</div>

Currently trying the new attachment traits and functions. Looks great ! But I am not sure how does this work in the current interface.

Release notes [VASSAL 3.7 Release Notes - Vassal](https://vassalengine.org/wiki/VASSAL_3.7_Release_Notes#New_Trait:_Set_Attachment_Property) talk about a new set attachment property trait. I am not seeing this trait in 3.7 beta 5. I can see a “select by attachment” in the new “set piece property” but had no luck making it work.

I used the attachment trait to attach two pieces in auto mode with allow attachment to self checked. Both have the same attachment name.

Then I used a set piece property trait in one of those two pieces. Pre-select by location. Select by current attachments. Everything else blank. I set a key command up. Nothing fires. The same key command in a dynamic property works on the current piece.

What did I do wrong ?

---

<div class="post-metadata">

### Author: ![Brent\_Easton](https://forum.vassalengine.org/user_avatar/forum.vassalengine.org/brent_easton/32/10_2.png) [@Brent\_Easton](https://forum.vassalengine.org/u/Brent_Easton)
#### Post date: [September 5, 2023, 12:59am UTC](https://forum.vassalengine.org/t/how-do-set-attachment-property-select-by-attachment-work/77795/2 "2023-09-05T00:59:50Z")

</div>

`Set Piece Property` now includes the functionality of `Set Attachment Property` as you discovered.

Can you please post screenshots of your Set Piece Property config, and of the two Attachment traits.

---

<div class="post-metadata">

### Author: ![Nico165](https://forum.vassalengine.org/user_avatar/forum.vassalengine.org/nico165/32/8129_2.png) [@Nico165](https://forum.vassalengine.org/u/Nico165)
#### Post date: [September 5, 2023, 5:55am UTC](https://forum.vassalengine.org/t/how-do-set-attachment-property-select-by-attachment-work/77795/3 "2023-09-05T05:55:54Z")

</div>

Here is the attachment trait (same for both pieces):

 ![Capture d’écran de 2023-09-05 07-44-06](https://forum.vassalengine.org/uploads/default/original/2X/c/c3e52e4afd0e276c28b491fa321917fd1220a5a9.png)

And here is the set piece property:

 ![Capture d’écran de 2023-09-05 07-56-42](https://forum.vassalengine.org/uploads/default/original/2X/d/db9829d62b769b69054d15d13555c2f952ce6198.png)

Also the same for both pieces. EIGHTH and AG F are then used to control layers to show that this piece belong to such army. That part is working on one piece using a dynamic property. I would like to use this set piece property to trigger the same behavior for both pieces from both pieces. The “select army” command show up in the right click menu for both pieces but no user prompt shows up.

---

<div class="post-metadata">

### Author: ![Brent\_Easton](https://forum.vassalengine.org/user_avatar/forum.vassalengine.org/brent_easton/32/10_2.png) [@Brent\_Easton](https://forum.vassalengine.org/u/Brent_Easton)
#### Post date: [September 5, 2023, 7:04am UTC](https://forum.vassalengine.org/t/how-do-set-attachment-property-select-by-attachment-work/77795/4 "2023-09-05T07:04:59Z")

</div>

I set up his same situation in a test module I have and it worked perfectly, so something else must be going on here. A few things to check:

- No Restrict Commands trait for Alt-A
- No other traits with a `Select Army` menu command
- Counters have been refreshed if it is a save game or pre-defined setup.

If you are still having trouble, post a link to your module and a saved game that has the situation set up.  
Regards,  
Brent.

---

<div class="post-metadata">

### Author: ![Nico165](https://forum.vassalengine.org/user_avatar/forum.vassalengine.org/nico165/32/8129_2.png) [@Nico165](https://forum.vassalengine.org/u/Nico165)
#### Post date: [September 5, 2023, 3:10pm UTC](https://forum.vassalengine.org/t/how-do-set-attachment-property-select-by-attachment-work/77795/5 "2023-09-05T15:10:01Z")

</div>

Thanks for helping !

I got it to work, and my mistake was much more fundamental: I did not understand that a set piece property does not create the property in the other piece. You need to create the dynamic property in the other piece, and then use a set piece property to modify it from the first piece.

Something useful to mention in the documentation I guess.
