Difficult Signalling

Status
Not open for further replies.

The Snap

Established Member
Joined
10 Jun 2005
Messages
3,118
Hi guys,
This is really aimed at the BVE4 coders of this world!

I am a bit stuck with some signalling. I want my route to load up, then start with a red signal, which then changes to green/yellow beofre the train leaves - as seen often in NWM for trains starting at Maybank. How do you do this??? Does it involve a dummy station?

Cheers,
 
Sponsor Post - registered members do not see these adverts; click here to register, or click here to log in
R

RailUK Forums

The Snap

Established Member
Joined
10 Jun 2005
Messages
3,118
Liam said:
Is there not a code where you can change the signal aspect at a given time?
Nope, not that simple Liam mate! :razz:

Chaz, you may have a point...;)
 

Dennis

Established Member
Joined
8 Aug 2005
Messages
2,676
Location
Trowbridge
Excerpt from tutorial 2.2, controlling signal aspects at stations.....

If we wanted the signal not to show a green aspect immediately, there are a couple of options available. The first option is to make the signal change at the station departure time. Recalling from tutorial 1_2 the station command, the sixth parameter controls the aspect of signals at stations. If we change
0,.Ground 1,.back 0,.railtype 0;1,.sta yourname1; 09.2720;09.2805;;1;0;;;7;10;;0,
to
0,.Ground 1,.back 0,.railtype 0;1,.sta yourname1; 09.2720;09.2805;;1;1;;;7;10;;0,
we find that the signal clears a few seconds before the departure time.


For reference, the .sta command;

.Sta Station2; 12.3100;12.3200;;-1;;;;30;30;;0,
The semicolons are used to separate the individual attributes of the command, these are in the order

Station name; - the name of the station (appears on the jump to station list)
;arrival time; - in hours.minutesseconds ** note the syntax used **
;departure time; - also in hours.minutesseconds
;pass alarm - NOT used in BVE 4, leave blank
;door opening side; - use -1 for the left, 1 for the right.
;signal at station; - IF there is a signal immediately after the station, 1 shows red, 0 green
;safety system; - NOT used in BVE 4, leave blank
;sound; - filename of sound played on arrival at station
;dwell time; - the minimum station dwell time in seconds
;loading factor; - how full the train is (0-250), values >100 may cause door problems
;train departing sound; - filename of sound played when departing the station
;timetable index, - denotes the timetable to be displayed in the cab (on pressing F3)
 

Coxster

Established Member
Joined
9 Jun 2005
Messages
9,244
This is the same as BVE2 as I've been using it for my Epsom branchline. It is witten in the tutorial on my website.
 

Derek Kaye

Member
Joined
9 Jun 2005
Messages
188
Location
Loughborough
for completeness, the other option is the pretrain command. you need these fairly freqently through the route.. normally at each station.

this has the form

.pretrain HHMM.SS,

which is the time that the train in front passed this point. bve then works out where the train in front is at all times and will display signals accordingly
 

Dennis

Established Member
Joined
8 Aug 2005
Messages
2,676
Location
Trowbridge
On the subject of pretrain or route.run interval, it should be possible to randomise the 'time' of the train in front and hence the signalling delays simply by making the time a random number.

Only problem I have with this is that the random numbers generated in BVE always seem to come up the same (find this when randomising rain and freeobjects as well) - anyone know how to get BVE to give true randomness?
 
Status
Not open for further replies.

Top