Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
Now let's take our staircase a little bit further and let's go ahead and turn on and off the railing. Sometimes you want a staircase that doesn't have railing, sometimes you do, so let's make this a little bit more robust. So I' going to go into my Component Attributes window and let's go ahead and select our object here, and let's go into our rails. So if we want, we can add in another attribute called Hidden.
When this is False that means it's not hidden, so True is hidden, False is shown. So if it's False that means you can see it, if it's True that means it is hidden, kind of feels a little bit opposite then what it should be. So if I wanted to I can type in the word True here and they would disappear. In SketchUp False is zero and one is True, so I could type in just the number zero and that would work as well.
Now what I want to do is actually create an option that allows people to turn on and off the rails from the Component Options window. So in order to do that I need to add an attribute here, and I'm going to call that attribute Rails. And in that under the Details we're glowing to create a list. Okay, and this is just going to be a two option list and we can just say On and so that value would be -- if they're on that means it's False which means zero and then off which means True, which means 1, Apply.
So if I select this and go into my Component Options window here, you'll see rails on or off, and notice how that changes that value. So if I want I can now tie this under rails to this value here. So I want to make this equal to that, and when I do that it should come up.
So let's take a look at this, go into my Component Options window here, Rails On, Rails Off, hit Apply, there we go. So now I have the ability to turn my rails on and off. So this can be used for a number of different things. It's really nice to be able to control visibility, so if you want to you can have an object where you can turn off certain things to reveal other things as well. So this hidden variable can work to your advantage in a lot of different interactive environments.
Get unlimited access to all courses for just $25/month.Become a member
102 Video lessons · 7147 Viewers
109 Video lessons · 9451 Viewers
56 Video lessons · 14175 Viewers
97 Video lessons · 9493 Viewers
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.