PDA

View Full Version : revolving door with breakable glass


Yithian
07-07-2007, 11:17 AM
I'm having trouble making a rotating door with breakable glass. I followed Madball's tutorial on hl2world but it's acting weird when I run it in my mod. It works fine for func_doors, and I've created several sliding patio doors and windows with breakable glass for my current map without any problems. When I try to get it to work with a func_door_rotating and func_breakable_surf, however, the brush flickers a lot and the door moves really really slowly, obviously not working properly, and looking a bit like a physics error. If I break the glass, the door swings fine and acts normally.

I realize that I'm probably just setting something incorrectly, but I've tried changing several settings and I still can't get it to work. :confused:

Ultimately, I'm trying to make a revolving door with breakable glass. I want four doors attached to a central axis that swings 90 degrees when you touch it. If I make four brushes and bind them together as a single func_door_rotating, I can get it to turn, but I don't want it to close because then it turns backwards! I just want it to stay put. But then if I make it stay open, I can't use it again because it's stuck in the open state. I've tried making them four separate doors parented to each other, but, as I've just discovered, you can't do that in Hammer: if I try to create a circular parent-child relationship like this Hammer shuts down with an error.

I'm sorry if I sound like a total noob, but, well, I am. Anyone have any suggestions?

blacksmith123
07-07-2007, 12:04 PM
NOTE: This thread belongs in the mapping section, but no problem.
Instead of making it a func_door of any kind, make your revolving door a func_physbox. Then, create a phys_hinge with the actual entity at the bottom in the exact center and the origin placed at the top. The line between the entity and its origin will form the axis that your door rotates around. Put the name of your door in the "entity 1" field. So, yeah, that's about it, set the friction to whatever you want, and if I were you I'd set the mass scale on the door to something like .1 or .25 to make it rotate more easily. I'm not sure about the problem with your glass, it may be caused by parenting, but if not, make sure you have done the following:
Your glass brush is 1 unit thick, textured all over with nodraw, except for one of the front sides, it doesn't matter which one. That one should be textured with glass/breakable001a or something, I can't remember. Then make it a func_breakable_surf.

Yithian
07-08-2007, 11:35 AM
Thanks for the suggestion for the func_physbox, blacksmith123. I got my revolving door working pretty good, even with breakable glass, although the glass doesn't quite break properly or in the right places. But it spins fine, which makes my other problem with func_door_rotating alll the stranger. I've done everything exactly the way I'm supposed to, as far as I can tell, and it works fine in my revolving door, and with sliding doors, but with a regular rotating door I'm still getting the weird jerking effect and slow movement until I break the glass (which breaks properly, I might add). On one occasion (although I haven't been able to duplicate the effect), my func_door_rotating spun smoothly and at the right speed without my having to break the glass, but it spun a full 360 degrees and never stopped spinning! I waited like five minutes just to see if it would but I got bored and closed my map. I'm wondering if I'm the only one having this problem. Maybe it's something weird with my graphics card or something. I don't know.

Anyways, thanks for the help. Sorry about putting the thread in the wrong spot.

adamonline45
07-08-2007, 12:20 PM
Hi Yithian

Are you happy with just using the phys_hinge and letting the door spin freely? If not, I propose you make your door a func_rotating, and put a cylindrical trigger_multiple around it. For the trigger's outputs, make:

OnStartTouch, door_name, StartForward
OnEndTouchAll, door_name, Stop

Well, that's a rough explanation, I can elaborate if you're not digging the phys_hinge thing :) Also, I anticipate problems parenting a func_breakable_surf to a physbox, so the func_rotating may be a better idea.

For your glass, try giving the brush 1 unit of clearance on each side of its 'frame'. A lot of physics boxes , trains, rotating platforms, etc. get a little jumpy when a player or object makes contact with them.

Hope that helps!

-Adam

EDIT: Those IO names may be off from the actual term, but you get the idea ;)