| Switch |
![]() Hello and welcome to our switch tutorial. Here you will learn how to controll a light with a switch. First of all you need a light entity. Place somewhere on your map. Here you dont have to change much. You just have to give the light a name. Name it for example "light1". But you can choose any name you want to but remember the name for the switch!
![]() Now you need a switch. Create a brush for the switch. Place it somewhere on your map. Like near the door. in the room where you have put the light in. You can choose every texture you want. We used the noDraw texture and used a button texture later on.
![]() Now you have to change the brush to an entity. Select the brush with the selection tool. Use rightclick -> tie to entity. Change the brush class to func_button.
![]() But there is one thing you need as well. Click on output and add... now type in the following things:
![]() Now it is done. Your switch should work now. Compile the map and test it. If you use your "+use" button on your keyboard the light should switch on and off.
![]() |
|
Rating
Rated 0/5 (0 Votes)
|