Counting VP What am I doing wrong?

I would like to add some automatic VP counter to my Ticket to Ride module. The idea is this:

  1. When I put train into a region on map, it will set calculated property Points (which will be determined from LocationName).
  2. There will be global property called PlayerSide Points
  3. Any time I want to know the score, I will click on GCK toobar button and it will add all the values of property Points and set global property PlayerSide Points to its value so I can show it somewhere.

I have done this:

  1. GKC
  2. Global property
  3. Train prototype Trait list
  4. Calculated property
  5. Set global property

What am I doing wrong since after clicking on button there is no change in Blue player VP?
Thank in advance.

You are using the expression {Layer==Train} in at least 2 places; that will compare the value of Property Layer with the value of Property Train. I believe you actually want to check if the Property Layer contains the value Train, which would be {Layer == "Train"}, instead.

Note that for the SumMap function, this requires double-quotes inside of double-quotes, so you need to “escape” the inner set: {SumMap(Points, "{Layer == \"Train\"}")}.