Using AND for Multiple Conditions

  • dear forum, dear klaus


    the layer skip_intro should be removed if there is no sponsor hotspot and no intrologo in the respective scene station
    (each of the used actions are working very well alone)


    I found the following in an older post
    --------------------------------------------------------------------------------------
    For example, for an AND like:
    IF( A == B AND C == D , then do_true_action , else do_false_action )

    if( A == B ,
    if( C == D , do_true_action();
    , do_false_action();
    );
    , do_false_action();
    );

    -------------------------------------------------------------------------------------
    and i replaced this with my actions (each of this actions are working very well
    stand alone)

    if( hotspot[Stationensponsor]===null,
    if(layer[logo1].visible,false, removelayer(skip_intro);
    , set(layer[skip_intro].alpha,0.5);
    );
    , set(layer[skip_intro].alpha,0.5);
    );

    but this does not work
    does anyone find the mistake
    thanks
    wbr klaus

  • NOOO .. this old example code is totally outdated! *squint*

    AND / OR etc are totally fine, so you should use :

    Code
    if(hotspot[Stationensponsor] == null AND layer[logo1].visible == false,
    	removelayer(skip_intro);
    ,
    	set(layer[skip_intro].alpha, 0.5);
    );


    or shorter

    Code
    if(hotspot[Stationensponsor] AND layer[logo1].visible,
    	set(layer[skip_intro].alpha, 0.5);
    ,
    	removelayer(skip_intro);
    );

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!