Layers Follow Expression Question

I have a war game module. There are two units, Unit-A and Unit-B each with a Layer trait. I want Unit-B’s Layer level to automatically be the same as Unit-A’s Layer level.

I’ve been able to do it by creating a Global Variable and have Unit-A set that Global Variable to Unit-A’s current Layer level any time the level is changed and then have Unit-B use “Levels follow expression” to follow that Global Variable.

My question is, is there a way to just have Unit-B’s level directly follow Unit-A’s level without going through a Global Variable. That is, is there an Expression to use in Unit-B’s Layer trait’s “Levels follow expression” that directly looks at Unit-A’s level?

Thanks

No there isn’t

From: messages [mailto:messages-bounces@vassalengine.org] On Behalf Of jimpyle
Sent: Saturday, February 28, 2015 10:02 AM
To: messages@vassalengine.org
Subject: [messages] [Technical Support & Bugs] Layers Follow Expression Question

I have a war game module. There are two units, Unit-A and Unit-B each
with a Layer trait. I want Unit-B’s Layer level to automatically be the
same as Unit-A’s Layer level.

I’ve been able to do it by creating a Global Variable and have Unit-A
set that Global Variable to Unit-A’s current Layer level any time the
level is changed and then have Unit-B use “Levels follow expression”
to follow that Global Variable.

My question is, is there a way to just have Unit-B’s level directly
follow Unit-A’s level without going through a Global Variable. That is,
is there an Expression to use in Unit-B’s Layer trait’s “Levels follow
expression” that directly looks at Unit-A’s level?

Thanks


Read this topic online here:
https://forum.vassalengine.org/t/layers-follow-expression-question/7551/1