Talk:Adding a new weapon to your mod
Stance Errors
Ok i have followed this tutorial exactly for my source 2007 HL2DM mod and i am getting an error like this
error C2248: 'E_DUCK' : cannot access private enumerator declared in class 'C_BaseHL2MPCombatWeapon'
This is repeated a couple more times but the E_DUCK is replace by either E_MOVE E_STAND E_RUN E_JUMP E_INJURED E_DYING
Can someone help me resolve this problem
--Disabled logic 06:58, 21 February 2012 (PST)
EDIT: I fixed it, i just had to change a private to a public in weapon_hl2mpbasehlmpcombatweapon.h where it told me to insert the E_*** data
--Disabled logic 06:58, 21 February 2012 (PST)
Should this be updated?
I have noticed how outdated the VDC has become as the 2013 Source branch was released, more needs to be usable in the 2013 engine as well as the Orange Box Engine should have different sections in their page, or a whole new page. Do you agree?
Error Help
I get errors when adding the weapon_ak47.cpp file into visual studio in games.sln, do I have to use everything.sln or is it impossible to do this I have tried with 2007 and 2013 and both give me the same errors
Someone please rewrite this
From what I can tell, not only is this tutorial outdated but it only works for multiplayer and doesn't give clear instructions on how to get it work for singleplayer. I've spent weeks trying to figure out how to get any of this to work as the singleplayer and multiplayer engines/bases/etc. are so vastly different but the author seems to think the only difference is the acttable.
This is seemingly the best, most up-to-date tutorial with a great example weapon but even this one doesn't work. Could someone who knows how to make weapons either remake this article or point me to one that actually works for what I'm trying to do? Please and thank you.
Greenhourglass (talk) 00:16, 8 October 2016 (UTC)
Good News (Fixed!)
I have added an entire single player version, including custom ammunition coding from start to finish on this tutorial. When I recently tried adapting the multiplayer code for movement penalty on player accuracy I noticed that the weapon creation part of this was not well explained. I will be making a tutorial dedicated to weapon spread and vector cones in an upcoming section. Hope this helps.
Matthew334 (talk) 10:46, 11 August 2019 (UTC)
Added a section for ppl to know how to make weapons spawn in single player
i took the liberty to add this since ppl didn't know how to make their custom weapons spawn in single player with impulse 101 so ppl don't get confused