Need Help Troubleshooting Scripting for Buttons

Hi,
Two of my buttons in the “Nav” group are not working as intended, and I’d like some help troubleshooting. I’ve used similar scripting before without issues and am currently stumped.

The “Button1-engine” currently only does the following:

  • Hides the “Directions”
  • Shows the “Box”

It should also do the following, but does not:

  • Show the “Exhaust” and “Engine”

The “Button1-servicing” should play the “Video”, but it doesn’t show.

I’m getting the following error when I upload “undefined method `etag=’ for #”. To download the ZPP file, please use this Dropbox link: https://www.dropbox.com/s/hov2bkzt70tc2o3/Engine%20Insides.zpp?dl=0

I appreciate your insights and responsiveness :slight_smile:

Best,
Johnny

1 Like

Hi

  • Exhaust and Engine: the group and the 3D model share the same name in the hierarchy. So, just rename the 3D models.

  • Video: you set the visibility of the player, not the group…

BTW don’t forget the semicolon at the end of the JS statements. :grin:

Cheers,

1 Like

Hi,
Thank you so much for your quick reply! Your suggestions fixed the issues :slight_smile: and now my experience works the way I want. I also know what NOT to do when naming things…

All the best,
Johnny

1 Like

Hi,
I’m glad it’s working! :ok_hand:

About naming convention, you can try this tool. It’s for JS variables, but you can apply these simple rules to your nodes and symbols.

Anyway, if you have a doubt, simply drag’n drop your node/symbol onto a script window to see the name used by Studio.

Happy coding! :grin:

2 Likes