attachment maker problem

Motorman1066 uses a script called "sparky.gs" to control the trolley pole sparks in his Brisbane tram cars. It takes into account the weather, tram speed and so on. Works a treat in TRS2006, I have not tried it in TS2010, but it should work.
One example is his Dreadnought Trolley Pole kuid2:108959:10:1 It's on the DLS. He uses the trolley pole like a tender. It's a separate asset that tracks the top of the pole so it follows the overhead wire.
 
Last edited:
should i add the sparky.gs to the folder of whatever mesh i want it to be at like the bogey or the traincar mesh?
 
Read the Content Creators Guides for advice on asset folder and file layout.

The forum is not here to teach you the content creation, that is up to you. We will help if you have problems when you have made reasonable attempts at content building.

Script files are always located in the asset root folder with the config.txt file.

In this case study Sel's (motorman1066) example. You will need your attachment points named exactly the same as the example.
 
Yes, if you know how to program scripts. You can probably clone sparky.gs and adapt it for use with the subway bogie.

Bob
 
Spark.gs modifications

Shown below are two simplified flow charts. The one on the left is for the current Spark.gs script. The one on the right shows the changes required to use spark.gs to generate sparks on a subway car's bogies.

Flow description for Spark.gs:
1. Initialization includes declarations of functions and variables.
2. Loop until one or both pantagraphs are up.
3. Get the weather, speed and power setting for use in adjusting duration, intensity and random occurance of the spark effect.
4. If the random timer has elapsed generate the sparks and reset the timer, else decrement the timer and loop back.

Flow description for use of a modified spark.gs for use with subway cars is:
1. Same as above.
2. Loop until the car is moving.
3. Same as above.
4. Same as above.

The need changes to spark.gs are trivial. The biggest problem I can see is determining which side of the subway car the third rail is, since only the pickup shoes on that side should spark.

Bob

FlowChart.jpg
 
Since the spline of the 3rd rail and the spline of the track are separate, that will not happen. You can't expect the spark to know that there is third rail present. A track spline, or placeable segment would have to have to be scripted in order to correspond with the spark of the attachment.

You, know, you're getting more problems out of adding a single attachment point than just making the whole train yourself.
 
Since the spline of the 3rd rail and the spline of the track are separate, that will not happen. You can't expect the spark to know that there is third rail present. A track spline, or placeable segment would have to have to be scripted in order to correspond with the spark of the attachment.

You, know, you're getting more problems out of adding a single attachment point than just making the whole train yourself.

you must really know a lot huh lol, well you was the first one out of everybody i saw make the spark effect work with a subway car and i asked you how and you never tole me what did you do to get it to work. what exactly should i do Bstyles?
 
I am trying to made attachments to a thomas and friends loco and the body is gone after I save it not in the file but in the program in trainz plz HELlP!
 
Back
Top