A "Score" or counter to measure goods sent out thru portals?

Chris004

New member
I'm pretty sure I could do this with a trigger and the right session rules... Not at all sure I can puzzle out how to do this :-(

I could use some suggestions re: what session (or driver?) rules I should be looking at.

-----------------------------End of main bit-------(read further only if still interested)-----------------

I'd like to have this so I get a sense of accomplishment for all the freight I export from my route (as I'm sure you've figured out). I've never done anything much with session rules (esp the nesting bit) but it's high time I start (comp-sci major and all that... LOL)

I figure I'll start with a trigger on a one-way (out) track, and I'll nest the rest of the logic (session rules) under the "wait for trigger" (or trackmark, etc) rule.

Where I'm stuck (mainly) (so far) is the way to get the consist's load, so I can add all the various commodities to their respective variables. (I know I stumbled upon that rule ... shoot: or was it a script?). I just have no recollection of where or when.

Again, any suggestions about the names of potentially useful rules would be so helpful. And/Or point me in the direction (URL?) of the man pages to the "Library of Session Rules" (if such a thing exists - seeing as how there are so many different creators-of-rules). I get fairly well lost (distracted, more like) on the Wiki - and I never know if I've found all there is on a given topic...

On a (somewhat) related topic, while we're on the subject:

**** Is there a (simple?) way to tell a train's direction of travel when it crosses a trigger? ***

I've tried to work the problem with 2 triggers and timers and such but it seems pretty convoluted and absurdly complicated. I'm sure I'm just missing the rule that does this already.

Thanks, folks. Lost w/o all the help... --- Chris
 
There must be something because Justin Cornell from Jointed Rail does this with his locomotives. They have a car counter and length counter in the cab.

The problem I see with a trigger is it'll trigger once for the train hitting it and exiting, but never know what's in between.

Other than this, I'm lost on how to do something like that.

John
 
Dang, John!
I was counting on you :-) You always have a well considered reply to my posts.

Since I first posted I think I've remembered where I saw the product polling: it was a library function used in (Vulcan's? Euphod's?) slow-loading script*. So perhaps I'll end up having to script my own session rule using this function in a for-loop. Shoot, I was hoping to learn to use session rules before writing any of my own.

*It was definitely Vulcan's Ore Barge, but I think it was Euphod's script... I should go look at the barge's description; I know there's a script-writer's credit in it.

So, basically, I need to write the session rule version of the "TrainProductInfo" Driver command. I was hoping to not have to re-invent the wheel...
 
Driver Command or Portal that can output to text?

So, basically, I need to write the session rule version of the "TrainProductInfo" Driver command...
D'oh! I don't need a session rule! I just need a driver command that can write to a text file and whenever I issue a 'drive off the map' command i also issue the "Report Consist Load to ExportReport.txt" command. -ewwww. except just because the driver was told to leave the route doesn't mean it happens...

OK. I need (to make) a portal that does the reporting itself. Obviously the iPortal does this except the generated file is sent thru a network, not written to disc. Alright, it's off to the "Content Creation Forum" for me.

Thanks taking the time to help, John.
 
Back
Top