Where is the best place to add a new model?


(Magik) #1

I know this may sound a little stupid but where do I add a model for a new type of entity in the code?

Can I just add it to cgs (cg_main.c) and then use the model index with an entity to make it use the new model?

I searched all of this forum and planetquake and so on. But all resources I found deal with map model creation or player model creation or replacing weapon models etc. but I want to add a new type of model (although a fairly simple one) to the game.


(MuffinMan) #2

you can set the model name and path at the entity definition (just before you spawn it), just copy paste from the props, that’s what I did, don’t have the code at hand now though


(Magik) #3

Ok, that worked, although I get a skin not found error I can see my model. How do I attach a texture? Do I need to specify one in the modelling software I use (Milkshape at the moment) and do I need to write a shader or is a tga file with the texture sufficient?


(ikanatto) #4

for Milkshape, the qc file is essential when you export md3. it contains the file path of the texture and other important information.