Jump to content
Sign in to follow this  
Dumarus

Else if command

Recommended Posts

Hi everyone,

I'm building a HDA that will pick the the proper geo at the prims of the proper size, but I need the "else if" statement that is not available in hscript.

What I need is the multiple if command that will output just one true value (there will be one true value actually).

Is it possible w hscript?

Best Regards

Tom

 

Share this post


Link to post
Share on other sites
3 hours ago, Dumarus said:

Is it possible w hscript?

it is

{
    float out = 0;
    if($F>100) out = 3;
    else if($F>50) out = 2;
    else if($F>10) out = 1;
    return out;
}

however you can always use Python if necessary

  • Like 1

Share this post


Link to post
Share on other sites
On 18.12.2019 at 9:00 AM, anim said:

it is


{
    float out = 0;
    if($F>100) out = 3;
    else if($F>50) out = 2;
    else if($F>10) out = 1;
    return out;
}

however you can always use Python if necessary

Thank you anim. This place is great :-)

I will test it out.

Share this post


Link to post
Share on other sites
On 18.12.2019 at 9:00 AM, anim said:

it is


{
    float out = 0;
    if($F>100) out = 3;
    else if($F>50) out = 2;
    else if($F>10) out = 1;
    return out;
}

however you can always use Python if necessary

Hi Anim.

It is working like charm now.

Thank you a lot :-)

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×