Quantcast
Channel: Daz Script Developer Discussion - Daz 3D Forums
Viewing all articles
Browse latest Browse all 1036

show/hide multiple items

$
0
0


I am trying to have four items be shown or hidden, showing and hiding 2 items works fine but when i try to show/hide the same 2 items and add 2 new items things do not function properly

("glasses" is in the sacript as when the code was done it was designed for various accesories, now it is mainly just footwear)

please see script example below-thanks for any help

 

 function show_hide_glasses(){

  if(count==1){ 

          var item_glass1 = Scene.findNodeByLabel( "blue shoe L" );

var item_glass1_2 = Scene.findNodeByLabel( "blue shoe" );

        if (glass_count == 1)

        { item_glass1.setVisible( true );

  item_glass1_2.setVisible( true );

}  else   {     

          item_glass1.setVisible( false );

  item_glass1_2.setVisible( false );

}

          var item_glass1 = Scene.findNodeByLabel( "blue shoe L" );

var item_glass1_2 = Scene.findNodeByLabel( "blue shoe" );

var item_glass1 = Scene.findNodeByLabel( "spikes L" );

var item_glass1_2 = Scene.findNodeByLabel( "spikes" );

        if (glass_count == 2)

        { item_glass2.setVisible( true );

  item_glass2_2.setVisible( true );

}  else   {     

          item_glass2.setVisible( false );

  item_glass2_2.setVisible( false );

}

 

 


Viewing all articles
Browse latest Browse all 1036

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>