I was testing the possibilities for counting. I wish that any delivery at industry get scores. The best solution would be count the quantity of products.
... which is exactly how it is done in several of the built-in TS2010 sessions.
Firstly, let's configure and display a variable.
* Add the "display custom HUD" rule to the session.
* Add a "variable modify" rule (configured to set a named variable to zero).
* Add a "variable show" rule (configured to show said variable).
Now when we start the session, we should see a new element in the HUD - an entry for a scoring variable, set to zero.
* Set up the industry you want to check so it starts with none of the relevant product, and does not consume it - just stockpiles it. This is the queue we will measure.
* Add a "resource check" rule to your session. Point it at the relevant queue, product, and industry - the one we set up in the previous step.
* Work out how much cargo you want delivered, and configure the rule to complete when the queue goes above that amount. (Start with a small amount for testing, and bump it up later, once you know the rules are working).
* Add a rule that will do something as a child of the resource check rule. For now, use a "variable modify" rule. Configure it to add some specific number of points to the score variable you showed earlier.
This last rule is a child - and needs to be put underneath the parent rule, and indented one to the right.
Now drive the session. When you deliver the correct amount of cargo to the industry, you should see the score go up by the amount you said.
Repeat this process for a number of different industries, so the score will build up as the player satisfies each industry.
Now to tell the player they've completed the session:
* Work out what the score will be when all the industries are satisfied
* Add a "variable check" rule. Configure it to check the score variable is greater than or equal to the value you worked out, and to check every second.
* Add a "display HTML" rule as a child of the variable check rule. Configure this to show a 'session complete' page (provided as a separate HTML asset).
If you want to do several things at the child level (e.g. display HTML, and mark the session as complete in the achievements system), then you'll need to use one of the 'list' types - either an "ordered list" (do each one of these things in sequence, waiting for them to complete in turn) or a "simultaneous list" (do all of them in parallel).
This setup is fairly basic. It won't penalise speeding or passing red lights (rules are available for checking each of these conditions), and it doesn't cover returning vehicles to specific places - for that you'll want to use trigger checks. Have a look at the default sessions to work out how individual things are done.
HTH