Jump to content

Empfohlene Beiträge

Geschrieben

At the time, you cannot unite two text variables to one new string. Use instead two (or more) labels next to each other to show the information.

Zur Zeit kannst Du nicht zwei Textvariablen zu einer neuen Zeichenfolge vereinigen. Benutze stattdessen zwei (oder mehr) nebeneinander angeordnete Beschriftungen um die Informationen zu zeigen.

Henry

 

Geschrieben
17 hours ago, Henry said:

At the time, you cannot unite two text variables to one new string. Use instead two (or more) labels next to each other to show the information.

Zur Zeit kannst Du nicht zwei Textvariablen zu einer neuen Zeichenfolge vereinigen. Benutze stattdessen zwei (oder mehr) nebeneinander angeordnete Beschriftungen um die Informationen zu zeigen.

Henry

 

I hope you are going to add this feature, the OTHER reason I'd like to do this is to combine variables to POINT at an object.

e.g. "Track_" & Variable

Geschrieben

Specifically at the moment.. I want to lookup a NEXT action for a train when it enters a track section. Obviously I need to use the track section ID but I would also need to combine the entry direction into the track AND the direction of the locomotive itself (i.e is it reversing)

Geschrieben (bearbeitet)
14 hours ago, Curt84328 said:

this might work,  since a label only tells the user something and does nothing else  you use more than one label.

name and speed.mbp

Not really what I am looking for though Curt, I want to create a single variable name from a fixed set of conditions to reference some other variable or object.

e.g. On a track section I know the Train_Name (Say "Coal_Train") , I can lookup the train speed so I know if it is going forwards or backwards, and I can tell by the track events if it is moving say East or West, So I want to lookup a variable list with the name "Coal_Train_Forwards_East", "Coal_Train_Forwards_West" etc.

Ability to create simple FUNCTIONS would be great too... something like this.

Functoin_Dialog_1.jpg

Functoin_Dialog_2.jpg

Bearbeitet von trevor
Geschrieben

Hello Trevor,

may be, that "object variables" can help you:

In contrast to normal variables, which are identified by an arbitrary name, object variables are assigned to a specific object (e.g. a locomotive) and then referred by objectName.variableName. See the example below:

Objekt-Variable definieren.png

Defining an object variable "by hand", mark he object (in the example above the locomotive) and select the object variable editor by a click to the icon surrounded with a red circle. The definition window for variables to be assigned to the marked object will be opened. Here, you can specify the variables and assign values.

You can find already defined variables in the event control window after you have selected the link "Active timers and variables" at the right bottom corner.

Objekt-Variable referenzieren.png

You can manipulate the object variables also here.

Using the event control environment for manipulating and evaluating object variables, handle them analogously to normal variables with the difference, the object variables are referred by the syntax already shown above: "objectname.variablename".

Many greetings
BahnLand

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...