copy interconnected entities

copy interconnected entities

Re: copy interconnected entities Posted by mazemaster on Sun Jan 2nd 2005 at 6:32am
mazemaster
890 posts
Posted 2005-01-02 6:32am
890 posts 438 snarkmarks Registered: Feb 12th 2002
Some of you guys here are resident HL2 entity experts so hopefully someone know about this. (I think its possible with something in hl2 but im not sure)

Is it possible to copy a group of interconnected entities, but have hammre automatically update their properties so that the copy works independantly from the origional?

For example, suppose i am making a house with windows. Each window has some surrounding brush geometry, a window model, a windowpane brush, two env_cubemaps, and a func_areaportalwindow. These entities are interconnected in the following ways:
(1) The window model is set to break the windopane when it breaks.
(2) The func_areaportal is set to render the windowpane when you are far away.
(3) The env_cubemaps are set to point to the faces of the windowpane.

Now, that is a semi-complicated setup. The basic question is, suppose i want to put 15 of those windows on a house. If I just straight copied them the names/targets/etc for the second window would be the same as the first and so it wouldnt work. How could correctly copy them witout renaming all of the entities each time?
Re: copy interconnected entities Posted by Rof on Sun Jan 2nd 2005 at 7:24am
Rof
210 posts
Posted 2005-01-02 7:24am
Rof
member
210 posts 41 snarkmarks Registered: Dec 3rd 2004
You could use a point_template to make a copy of a functioning set of
those entities (you'll need to enter each entity under one of its
"Template XX" fields), and then spawn them in the right places with a
set of env_entity_makers (set to spawn only once).

If you don't set the point_template's "Preserve entity name" spawnflag, each spawned set will have unique names created.

However, you'll have to be very careful with the position of the
env_entity_maker to make sure the brush-based entities spawn in the
right locations. I'm also not sure about the cubemaps - I think they
won't work. Perhaps put the cubemaps manually in position near each
window.
Re: copy interconnected entities Posted by mazemaster on Sun Jan 2nd 2005 at 8:44am
mazemaster
890 posts
Posted 2005-01-02 8:44am
890 posts 438 snarkmarks Registered: Feb 12th 2002
Thanks! I'll give that a try.