[messages] [Module Design] Problems with Dynamic Property

Nelud ilyathebes at gmail.com
Thu Jun 9 10:32:48 CEST 2016


You problem is not related to trait order. The problem is with
understanding...
1. The "Counted" property is not built-in function in VASSAL. You could
assign any name to it.
2. You should not create extra DP if you use OldZone built-in property.
But there is a bug in VASSAL: the OldZone property is updated only when
you drag pieces by mouse. When you use commands to move you pieces, the
OldZone is not properly updated. So the whole thing about "Counted" (or
name it as you wish) property - is workaround this bug.
4. So if you planned to move pieces only by drag&drop then simply remove
all functions related to "Counted" DP and you will be fine.
3. The mentioned tutorial from tips&tricks section consider the case
when you need calculate something in ONE zone. In your case (multiple
zones) think of "Counted" property as replacement for OldZone. For
example name it "CountedIn" or "OldZone1" and assign it the name of
CurrentZone (or CurrentMap or whatever).
But I repeat it once again: use this spare property only if you want use
commands to moving you pieces.

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


More information about the messages mailing list