[messages] [Module Design] Comparing Properties Between Game Pieces

Brent Easton b.easton at exemail.com.au
Mon Sep 3 02:47:38 CEST 2018


Comparing properties between two pieces is a bit tricky in Beanshell
expressions. The old-style expressions had special coding which handled
each side of the == differently.

As far as I can remember, you should be able to use $...$ inside a
beanshell expression to force it to be evaluated on the source piece
before being tested against the destination piece:

{nation=="$nation$"}

You original example above would have failed due to using = instead of
== and no closing " (though that may be just typos when you where
writing it up).

Regards,
Brent.

_______________________________________________
Read this topic online here:
http://www.vassalengine.org/forum/viewtopic.php?p=55666#p55666


More information about the messages mailing list