Scripting question

General discussion about Train Simulator, your thoughts, questions, news and views!

Moderator: Moderators

Locked
JasVick
Been on the forums for a while
Posts: 241
Joined: Wed Jun 25, 2008 9:22 am

Scripting question

Post by JasVick »

Hi folks,

Ive been toying with an idea for a few days which is basically this:-

Is it possible for a script to be written which would allow for a code to be input as an "open" entry?

What I am thinking along the line of is a basic announcement system, whereby a text file could be created which contains the list of announcements, as a list of files, for example:

001 = Welcome aboard, which is played as the code is entered. File 002 would be the next station, file 3 is "this is" which is played when the door opens etc until the last terminating message. The next station setting could be something like say 300 metres from the stop.


It was along the line of move the reverser away from "0" (detect the first movement of the reverser) and activate the input. once the code is entered the first message would play when the doors open, if possible the rest would be "automatic". I know lua scripts can handle text boxes, I would assume that an input would be available, and as far as I am aware scripts are allowed to play sound files themselves. Not interested in a visual system, it would just be good to be able to have the announcements playing and was thinking that having the file play the sound as it occurred would sav a mass of re-scripting on the sound bin files if its possible...

If there is anyway anyone could help with this, It would be much appreciated especially if it was portable into any unit with relative ease.

Many many thanks in advance....
Locked

Return to “[TS] General Discussion”