[messages] [Module Design] To tell a side which created a marker

grouchysmurf lgrabun at gmail.com
Mon May 8 22:43:43 CEST 2017


There are counters. There are two sides (+solo).

Counters can be placed markers on.

I'd like to make two GKCs which would remove the makers--one for each
side.

How do I tell the side counter of which the marker has been placed upon?
I assume the markers are placed via right-click -> command. Is there a
way to differentiate the markers at the moment of placement--provided
they are the same in every aspect.

The solution to make two version of the marker (one for each side),
which would have a trait enabling to tell one from the other, is an ugly
hack.

...

Alright, I think I know. So I would add a Global Value--say it is called
VALUE. When a marker is placed (via C-M, let's assume), the counter
would also set value of VALUE--it would be set to A if counter on which
the marker is placed belongs to side A. It would be set to B if--you get
the picture.

The marker would then inherit value of VALUE--somehow. I could create a
marker trait which would be initialized by current value of VALUE, never
to be modified again. GKC I mentioned earlier would remove markers of a
given trait.

Any other ideas?

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


More information about the messages mailing list