Please Help....

trebhome

Newbie
Joined
Nov 19, 2004
Messages
158
Reaction score
0
I have tried countless time to get this right and I cant. A light hanging by a rope from a ceiling. When the light is shot it swings. Please Help, maybe someone could upload an example .vmf for me.

I know that in Prodigy (Which is exactly what Im going for here) they use entities as the Lights & Rope. Its one entity in the prodigy folder. But how do I make it swing, Like In prodigy????
 
Some people use length constraints to do this, but here is the method I like to use.

1: Make a tall skinny brush about the shape and size you want the light's rope to be. Make it a physics_brush and name it something like "swing_lamp_01". Texture it with "nodraw" since you don't want it to be visible.

2: Add a phys_ballsocket to the top of the brush, and link it's "Entity 1" to "swing_lamp_01"

3: Make a "move_rope" entity at the top of the physics_box, and a keyframe_rope at the bottom of the physics_box. Name the keyframe_rope, and set the "next keyframe" property of the move_rope to the name of your keyframe_rope. Set the parent of the keyframe_rope to "swing_lamp_01"

4: Add a prop dynamic at the bottom of the physics_box, and give it a parent of "swing_lamp_01" Set the model to something like "models/props_wasteland/prison_lamp001c.mdl" if you are doing this for HL2

5: Add a point_spotlight below the prop_dynamic model for your light, point it downward, and set its parent field to "swing_lamp_01"

Now you have a swinging brush, light emitting point_spotlight, rope to simulate the cable, and a model of a lamp.

That should swing around nicely when hit. In the project I am currently working on, I wanted to add background movement to make the map feel more "alive," so I created wind elements to blow on my lamps to gently swing them around.

For those I used a brush with the nodraw texture, that cover the base of the swinging lamp, and tied it to the entity "trigger_wind" and set the flags to only effect physics objects. Then I adjusted the random wind properties to give the desired gentle breeze movement.

Good luck.
 
Ok I did everything you said.......AGHHHHHHHHH. There is no physics_brush entity like you were taliking about in step 1. I tried to replace it with a func_physbox but that didnt work. When I run it in game my rope attaches itself to the wall behind it and the lamp just stays in mid air....Its just all messed up. Can you please send me a Room with a hanging lamp (For CS) in a .vmf file. It would make everything eaiser. I just cant make this work. Thanks for your help so far but I really need the file. If you cant post the file here, I will give you my email address and/or my AIM name. Thanks.
 
heres how i did it...Watch ICHIs video tutorial - go to the stickied thread - it has a sample .vmf file and the video of how he creates it.
 
sorry, I wrote all that without checking hammer, but if you do it with a func_physbox, it will work. You just have to make sure you have all the parenting correct.

The video tutorial light is ok, but the movement in-world is not too realistic when you use a length constraint.
 
I found a good way to do it. =)
What I do is in the props/prodigy folder there is a model...hanging light. I use that as a prop_physics_override....then I use a ball socket where I want it to piviot and its great. Thanks for your help everyone.
 
How do I do the dirt air ( dont know how to call it ) under the swinging lamp like in de_prodigy ? is it env_beam ?
 
Like the one seen in dust? That's a seperate entity I believe. Don't remember its name right now though.
 
Dirt Air???? Well there is an entity I think its env_spotlight. That looks nice. Then There is func_dustmotes. That looks like dust particles floating around.
 
Back
Top