ehem. OMSI - Forum
Würden Sie gerne auf diese Nachricht reagieren? Erstellen Sie einen Account in wenigen Klicks oder loggen Sie sich ein, um fortzufahren.
ehem. OMSI - Forum

Dieses Forum wurde geschlossen. Das neue Forum befindet sich auf www.omnibussimulator.de/forum !
 
StartseiteStartseite  Neueste BilderNeueste Bilder  SuchenSuchen  AnmeldenAnmelden  LoginLogin  

 

 Scripting Operators

Nach unten 
3 verfasser
AutorNachricht
krtz07




Anzahl der Beiträge : 413
Anmeldedatum : 10.09.09
Alter : 39
Ort : Philadelphia PA

Scripting Operators  Empty
BeitragThema: Scripting Operators    Scripting Operators  Icon_minitimeDi 16 Aug - 22:11

&& - And
|| - Or
! - I think is not equal but not 100% sure.
= Equal




Can someone be so kind to explain to me what these following operators do?

/-/
/ /
+ -
- +
* +

abs? absolute?

If there are any other known operators which the script uses, post them as well.

Nach oben Nach unten
http://www.philadelphiatransitvehicles.info
EirikhO

EirikhO


Anzahl der Beiträge : 61
Anmeldedatum : 07.04.11
Alter : 30
Ort : Norway

Scripting Operators  Empty
BeitragThema: Re: Scripting Operators    Scripting Operators  Icon_minitimeMi 17 Aug - 11:03

+ - means "add then subtract", for instance 1 2 3 + - means "1+2-3".

You also have < and > which are quite obvious, and => which is "more than or equal to", and <= which is "less than and equal to"

/ is divide, - is subtract, + is add and * is multily. No idea about abs.
Nach oben Nach unten
krtz07




Anzahl der Beiträge : 413
Anmeldedatum : 10.09.09
Alter : 39
Ort : Philadelphia PA

Scripting Operators  Empty
BeitragThema: Re: Scripting Operators    Scripting Operators  Icon_minitimeMi 17 Aug - 13:08

I have been using the greater/less/ equal to operators for quite sometime. The one which I am truly carious about is the /-/, I guess that means divade, subtract, then divide again.
Nach oben Nach unten
http://www.philadelphiatransitvehicles.info
Rüdiger Hülsmann
Admin
Rüdiger Hülsmann


Anzahl der Beiträge : 1204
Anmeldedatum : 25.04.09
Alter : 40
Ort : Potsdam-West, Berlin-Mariendorf

Scripting Operators  Empty
BeitragThema: Re: Scripting Operators    Scripting Operators  Icon_minitimeDo 18 Aug - 22:09

"1 2 3 + -" is actually 1 - (2+3). Any operator refers to the two values left of it and combined equations are solved from inside out. In this example: "Add 2 and 3 and subtract the result from 1".

When you find combined operators in the script, you'd use brackets in the regular mathematic notation. Another example:

(1+2)*3/(5-4) = 1 2 + 3 * 5 4 - /

"abs" turns the value into an absolute value

/-/ negates the value and turns for example 3 into -3.
Nach oben Nach unten
krtz07




Anzahl der Beiträge : 413
Anmeldedatum : 10.09.09
Alter : 39
Ort : Philadelphia PA

Scripting Operators  Empty
BeitragThema: Re: Scripting Operators    Scripting Operators  Icon_minitimeDo 18 Aug - 22:58

Rüdiger Hülsmann schrieb:
"1 2 3 + -" is actually 1 - (2+3). Any operator refers to the two values left of it and combined equations are solved from inside out. In this example: "Add 2 and 3 and subtract the result from 1".

When you find combined operators in the script, you'd use brackets in the regular mathematic notation. Another example:

(1+2)*3/(5-4) = 1 2 + 3 * 5 4 - /

"abs" turns the value into an absolute value

/-/ negates the value and turns for example 3 into -3.
You're the best! Very Happy

I was using some of those scripting practices in the past; however, I did not know the complete logic behind it until now.

Nach oben Nach unten
http://www.philadelphiatransitvehicles.info
Gesponserte Inhalte





Scripting Operators  Empty
BeitragThema: Re: Scripting Operators    Scripting Operators  Icon_minitime

Nach oben Nach unten
 
Scripting Operators
Nach oben 
Seite 1 von 1
 Ähnliche Themen
-
» Requesting: Havelbus, ViP, OVG and other operators in Berlin
» Turbocharger scripting help,
» Key Button Scripting
» To those creating buses and scripting their vehicles...

Befugnisse in diesem ForumSie können in diesem Forum nicht antworten
ehem. OMSI - Forum :: OMSI-Design (english) :: Script programming-
Gehe zu: