I've got a bit of code that needs to be written in the event editor, and execute in a somewhat intensive section, and assign a value based on an input value, but can't use the "if" cases in the expression editor. So I'm trying to come up with the way I can do this in the least operators, bit of a math puzzle if anyone cares to try.
Imagine it as this. Given X, if X == Y, return A, else, if X == Z, return B, else, return 0
So in my best guess so far, it might look something like this:
"Return {(1-Min(Abs(X-Y), 1)) * A + (1-Min(Abs(X-Z), 1)) * B}"
But I'd also like to modify it to let me bounds too, for example
"If X == (4 to 7) return (0 to 3)"
So my best 'comparison' set so far is "(1 - Min(Abs(X-Y),1))" which is a total of 4 different operators (min, abs, -, -)
Any way I can trim this down? Brain is hurting coming up with how I'd do bounds