Itoo Software Forum

RailClone => RailClone Pro (*) => Topic started by: IT1371 on September 18, 2018, 10:54:00 AM

Title: off/on and Arithmetics?
Post by: IT1371 on September 18, 2018, 10:54:00 AM
I have this simple expression in an Arithmetic operator:
Code: [Select]
if(input1>input2,1,0);Ideally I would just attach it to the on/off parameter of a generator or a segment, but it is not supported.
Is there a way around this? I can't use a Conditional operator..
Title: Re: off/on and Arithmetics?
Post by: Rokas on September 18, 2018, 11:34:59 AM
Although it gives You error:

(https://i.imgur.com/EJZNMQG.png)

It lets You do what You want. I have used it in similar situations without problems too.
Don't forget to add return constructor in front of Your expression.
Title: Re: off/on and Arithmetics?
Post by: IT1371 on September 20, 2018, 07:58:06 AM
Turns out it didn't work in the first place because I did not put the "return". I thought I can start with an "if"..
Thank you!  ;D