Aditya,

When you create objects from inside a mod, that aren't in your map, you need to
add them to the engine's render/object tree.  One way  to do this (I
think) is by
parenting the object using its setParent method.

I've never tried this with a brush entity.  I would use your first
object (the one you are pushing around),
grab its parent with GetParent(), then set the parent of the new
object using it.

If you are using VisualStudio, you can go to Edit->Find->Find in Files
and search
the *entire solution* for CreateEntityByName or SetParent..should give
you some example code..

Good Luck

Steve


On Tue, Apr 1, 2008 at 5:08 PM, Aditya Gaddam <[EMAIL PROTECTED]> wrote:
> Hi,
>
>  I am trying to make copies/instances of this panel I made in hammer in
>  my map. I followed
>  http://developer.valvesoftware.com/wiki/Authoring_a_Brush_Entity and
>  gave the panel the class specified in the tutorial and then used the
>  code in my mod. I was able to push the block around like the code
>  says. However, if I create more using CreateEntityByName, I don't see
>  anything. The returned object from CreateEntityByName is NOT null. I
>  called Spawn() and Activate() on the object, but to no avail. I can
>  set it's position and such. But I dont see it!
>
>  Is there a better way to instantiate stuff you can stand on in the
>  world? If not, how do I solve this problem above?
>
>  Thanks,
>  Aditya
>
>  --
>  http://www.pixelfaction.com
>  AIM:ApeWithABrain
>
>  _______________________________________________
>  To unsubscribe, edit your list preferences, or view the list archives, 
> please visit:
>  http://list.valvesoftware.com/mailman/listinfo/hlcoders
>
>

_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

Reply via email to