[messages] [Module Design] Problems with Dynamic Property

Nelud ilyathebes at gmail.com
Thu Jun 9 21:09:01 CEST 2016


> Each trigger depends on the onmove keystroke and each time at least 2
> triggers are firing 1 for leaving a zone and 1 for entering another
> zone (so which came first? chicken or egg scenario).

Yes, Tim is right. And both of these properties try to change the same
"Counted" value!

I change your module, and it works fine (in my humble opinion):
https://drive.google.com/file/d/0B5rEsE ... sp=sharing[1]
That is what I've done:
1. Changed the logic of "Counted" property. Now it reflects the zone,
where a piece was taken into account. In other words it is merely clone
of OldZone property. By the way I renamed it to "CountedIn".
2. Separated the command, which changes "CountedIn" property (i.e.
"setC"), from trigger actions, that increases/decreases "TotalStepsPC#"
global properties. I made it by adding one extra Trigger Action (named
simply "onmove"), that fired all other Trigger Actions one by one and
only then changes "CountedIn" property.
3. Improved logic when piece being deleted.

Hope this what you need.

[1] https://drive.google.com/file/d/0B5rEsEFCwBYeY3lBSi1yazJCeTg/view?usp=sharing


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


More information about the messages mailing list