Jump to content

Is there a ternary operator/shorthand conditional in LSL??


Ashasekayi Ra
 Share

You are about to reply to a thread that has been inactive for 4702 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

no inline ifs of the common types at all, however you can abuse the llList2* functions to get some of that functionality, although it's more costly than the id if/else versions.

z = llList2Integer( [5, 3], (a > b) );

and of course there is the math solution....

z = 5 * (a > b) + 3 * (a > b);

or

z = 3 + 2 * (a > b);

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 4702 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...