[page=Adding a button]
This is a fairly short and simple tutorial that will show you how to add buttons to your map. For the example we are going to create a button, that when hit will ignite a zombie. After learning this it is easy to use buttons for other purposes. This is my first tutorial, so sorry if it's not very clear.
Adding the room and models
First off we will create a simple room. Add an npc_zombie (name it zombie1) in the middle of the room and place your info_player_start near it. Create a prop_dynamic and choose a button model for it. Place this model on the wall near your info_player_start.
func_button
Next, we want to create a brush about the size of your button model and place it inside your button model. Give it the toolsinvisible texture. Convert this brush to an entity and make its class function _button. Go to the Outputs tab and click add.
Now fill out the propeties as shown in the above picture. and hit apply.
Conclusion
Compile the map, walk up to the button, and hit e. The zombie should burst into flames ( :) )
Now you can experiment with func_button try using it to unlock a door or toggle a light on and off. Have fun!
- Salohcin
Nice, althoguh a little vague
Sorry, if you want anything explained in further detail just ask :)
where can i get a list of funtions for the buttons (ignite, unlock), or is it already there and i just dont see it?
I don't no if anyone has made a full list of functions. I'd look around Valve developers community
Developer.valvesoftware.com
how do u choose a button model
how do u change the button ?????
confused?!! :(
its good but you've put this under begginer so it will need more detail to make sense to most users.
You dont have to go into making a map but a little more detail would be good
Indeed, a little vague, but I got by with what I learned from earlier tutorials. I was pretty proud of myself when I started that dumb zombie on fire, I've come quite a long way since I began modding this afternoon, but I've got plenty more work ahead of me! Thanks for posting man!