Jump to content

Signals and their track contact


Empfohlene Beiträge

I started with 3D train Studio in march 2020, and bought V6.

Can anybody give some help please. It is quite specific. 

Relation between the track contact caused by a signal on that track, and the signal itself.
In an event "track contact is triggered" how can i find the object name of that corresponding signal ? 
If so we can use the variables of that signal. 


A vehicle ( = wagons + locomotive ) hits the track contact of a signal. The wagons are in front of the Locomotive.
How can I find the name of the object of the hitting Locomotive ? 
I tried ( even in version 5 )   local vehicles = layout:getVehiclesOn(signal) , but in this case it is not working, beause the locomotive is not on that Signal's trackcontact.

Thanks if someone can give an answer.

Kind Regards

Herman

Link zu diesem Kommentar
Auf anderen Seiten teilen

Sorry, clarification

Of course we know the name of the locomotive if hitting the track contact. I use it myself since V5 - see also HP V6 Signals V02 submitted in the catalof.

But both questions are related.

How can I restart the vehicle in the event "Signal is changed" when i then cannot find wat Locomotive is before the signal.

Kind regards, 

Herman

 

Link zu diesem Kommentar
Auf anderen Seiten teilen

@HaNNoveraNer 

Hello,

Always thanks for a reply,

Ok i did use your suggestions before. I saved ( even in 5 ) the name of the vehicle in a variable from the signal. ( * attachment )

But Conditions to find the loc's name before the signal with something like 

  local vehicles = layout:getVehiclesOn(signal)
  for _, vehicle in pairs(vehicles) do
... and so on. 

do not work with vehicles where there are wagons in front of the vehicle. Because the loc itself is not before the signal ?

Another solution : put the signal in the beginning of a track, a vehicle that triggers this track will cause the vehicle to stop. Even with wagons in front, that works.
The track before that track is stretched as long as the whole train ( wagons + vehicle ) fits on that stretched track.

Kind regards,

Herman

HP V6 Signals V01b.mbp

Link zu diesem Kommentar
Auf anderen Seiten teilen

Hello,

I want to reopen a part of the topic, because my first question remains unsolved. 

A track contact from a Signal is triggered.
Is there ( or not ) a possibility  to find in that event the "object Signal itself" associated with that track contact ?
If so, we can adress variables of the object signal.

A solution is to place a triangular track contact near the signal with variable, type object, "MySignal", so please do not give that as an answer.

Back to the question possible - please how ? Or not possible.

Many thanks for a reply

Greetings,

Herman

Link zu diesem Kommentar
Auf anderen Seiten teilen

 

Hello, Thomas,

Thanks for the reply.
More specific The expanded variable version is known very well, and also contact in the script is known by me, and certain the use of contact.state.
But I'm looking for something like contact.signalsobjectname ( or simular ) to use it and adress the signals variable. 
Something like contact.variables["#TRR OpenSignal"] == $("") but in this example the contact. is a triangular track contact, and it has variables.

Hoping the question is clear enough.

KInd regards

Herman 

Link zu diesem Kommentar
Auf anderen Seiten teilen

Hello,

I appreciate your answer. I do not want to discuss, but I do not agree.

Gleiskontakt Blocksignal 1 werd beim betreten ausgelöst

The event says : the track contact from the corresponding signal is triggered. And that's a track contact not a signal.

If you do not agree : you can easily give variables to a Signal. Try to do that with a track contact associated with that signal. Impossible not ?Really no offence, but when reading some forum topics, there is a confusion what is the signal, and what is that's signals track contact.
The two are not the same at all.

Link zu diesem Kommentar
Auf anderen Seiten teilen

Hello Thomas,

Very pleased with your reaction.

Very useful , we are coming to the point.
v.targetspeedabs = contact.variables["StreckenGeschwindigkeid"] 

I have the English version of 3D Studio, and mean that StreckenGeschwindigkeid indeed is set by the signal.
But is it a own made variable set in the signal, that's where I'm looking for.

But many thanks,

Kind regards,

Herman

Link zu diesem Kommentar
Auf anderen Seiten teilen

Hello Brummi,

We are nearby a solution, 

Please give an example how I can make my own variable and put it on the track contact. I can do so on the signal.
If I put it on the SIGNAL, which is possible, should contact.variables["Herman"] work ?

I will try out to test it. Because that's i'm looking for.
Greetings,

Herman

Link zu diesem Kommentar
Auf anderen Seiten teilen

Erstelle ein Benutzerkonto oder melde dich an, um zu kommentieren

Du musst ein Benutzerkonto besitzen, um einen Kommentar verfassen zu können

Benutzerkonto erstellen

Neues Benutzerkonto für unsere Community erstellen.

Neues Benutzerkonto erstellen

Anmelden

Du hast bereits ein Benutzerkonto? Melde dich hier an.

Jetzt anmelden
×
×
  • Neu erstellen...