• Questions while working on a game mode?
    3 replies, posted
So I am working on a game mode currently but it will require a lot of modeling and I was wondering how would I create player models that are custom made and maybe just added onto some already in the game player models. My other question I was looking for help with was how can I attach an entitie to a player model? Thanks I really appreciate any help on this development.
So I think your answer to your second question is the answer to your first question, however I don't know the answer to your second question so I can't help you there :)
I suggest you look into code from addons such as PAC, SWEP Construction Kit, and Pointshop.
To attach entities to other entities; the best way is a visual representation such as ClientsideModel. Althernatively, you can use other methods; when you attach things to other things you have to be aware of PVS, the objects don't always appear unless you use it properly or use the CSM method. You'll need: ENTITY:LookupBone ENTITY:GetBoneMatrix MATRIX:GetTranslation MATRIX:GetAngles You'll need to understand manipulating positions along the MATRIX:GetAngles( ):Right( )/Forward( )/Up( ) MATRIX:GetAngles( ):RotateAroundAxis also using Forward, Up and Right That should be enough to have something attach and move with a bone using a ClientsideModel. This is the cleanest way and looks the best. See this video: [url]http://www.youtube.com/watch?v=T7V8NZPBeDo&hd=1[/url] Look at the pistol on the side, and the rifle on the back. That's 100% entirely done client-side, no networking required; it also works with other players on the server. ( Old video, I've since made it more advanced by using actual holsters instead of just hanging a gun there ). The Pistols were attached using: "ValveBiped.Bip01_R_Thigh" and the long-gun was attached using Spine 2. If you don't want to learn to code, or learn math which goes along with it; do what BFG suggested.
Sorry, you need to Log In to post a reply to this thread.