create primitives in code

  • Thread starter Thread starter Rikard
  • Start date Start date
R

Rikard

Guest
Hello,
Is there a way to create primitive shapes in the code? Lets say I want to create a "weapon" that can make crates. How do I create and manipulate basic shapes?

Another question: is there an overview and documentation of the different classes and functions in the sdk somewhere?

/Rikard
 
If you mean primitives as in the solid brushes that Hammer uses, the answer is "probably not". But if you want prop models to appear out of a gun, the answer is yes, quite easily.
Search the code for
Code:
CreateEntityByName( "prop_physics" )
and use it as a reference.

Sadnly, there's no overview.

-Angry Lawyer
 
Thanks Angry Lawyer,

What I´m trying to do is to allow the player to build blocks in the map, ie also decide the size and shape of the blocks when building them. I guess I could assign bones to a model that controls its shape.

Do you know how to control the bones in a model through the code?
 
No idea. That's way above me. Try just cycling through a number of possible shape models.

-Angry Lawyer
 
Back
Top