category
General Half-Life 2/Entities
description
A few examples of what you can achieve with prop_physics entities.
keywords
advanced, prop, physics, prop_physics, physic.
This is an advanced tutorial on using props physics for things such as pictures on a wall, computers on a desk, etc. The CSS map "Office" is a good example of using props_physics.
To start off we need to recognize what models can be used as prop_physics and what models can't. Not all models can be used as a prop_physic and if they are then they will be deleted from the map during compiling. 3 example models that can be used as prop_physics are, "models/props/cs_office/TV_plasma.mdl", "models/props/cs_office/offpaintingb.mdl", and "models/props/cs_office/Table_coffee.mdl".
First off lets start by creating a flat screen T.V. that hangs on the wall. We want the T.V. to stay on the wall and fall off when its shot at. First place a "prop_physics" entitie into the map. Then open up the entitie's properties and click on "world model" and then "browse" to select the "models/props/cs_office/TV_plasma.mdl" model. After this we need to specify that the model will not move until it takes damage. Click on
"Health Level to Override Motion". Type in a number (30 will be good for this model). This specifies how much damage the model will take before it breaks and falls to the ground. Let's add a little fun to this T.V. by making a small explosion that occurs when the T.V. breaks. Click on "Explosion Radius" and set it to a small number like 5.
That's it for the T.V., you can use this same method to make pictures on a wall. Just make sure the pictures have a 0 explosion radius. It wouldn't be very realistic to see a picture of someone explode off of a wall.
Here's a before and after pic of what the T.V. should look like if made properly.
Now for models that will lay on a surface such as a table on a floor or a computer on a desk. This is basically the same exact process as making the T.V. except for a small change.
Let's make a computer that will sit on a desk and explode into pieces when shot at a few times.
Create another "prop_physics" entitie and choose the "models/props/cs_office/computer_monitor.mdl" model. Set the "Health Level to Override Motion" to a number around 50. Now go to the "Flags" tab and select "Motion Disabled". This will keep the player from bumping into it and moving it. The model won't move now until it takes enough damage. Now set the "Explosion Radius" to a small number such as 1.
Well that was it. You can use the same method for the computer as a table. Just make sure the "Explosion Radius" is set to 0.
Here is a before and after pic of what the computer should look like.
That was easy now wasn't it. I hope this has helped expand your knowledge on using "prop_physics".
Spartan 34