How to set a Property

I want to detect if a Mech unit has attacked in the combat phase and mark it with the Border Outline trait and if it has not attacked don’t mark it. If it has the Border Outline trait (i.e. it has attacked) I want to have that cleared when the user clicks the Moved button (or maybe I need a new button?).

I have a prototype called Mech but I am not quite sure how to proceed.

I am not sure how to go about setting this up so looking for any assistance.

I don’t know if its best to set a GP like HasAttacked to say false and then somehow indicate that this is set to true and reset the mech prototype HasAttacked to true and then some how clear that out at the end of the turn.

Maybe if there was an example in one of of the hundreds of vassal modules I could look at?

Global Properties have just a single value. Every piece can reference them. If you want to be tracking who did/didn’t attack, that sounds like something that should be tracked on a per-unit basis, thus the Dynamic Property is best. Instead of a single property that lives at the level of an entire map or the whole module, if you put a DP in a prototype, every unit using that prototype will get its own property that can be adjusted independently of all other units.

Once you get to the end of a turn and want to clear this visual indicator cleared for all units where the “did they attack?” property is true, you’d use a Global Key Command, sending whatever key command you defined in the Dynamic Property sets its value to false (making a Border Outline switch off).

Thank you. For that.

So sounds like the best solution is to use a dynamic property to set attacked = false to start and somehow mark that as attack (not quite sure how to do that yet) and then do the global key command to clear it.

Now to figure out the exact details lol