New Weapons C'mon! Why wont you show!


(vtxaussie) #1

hello, this is prob my last attempt of importing new models into the game,
i am having major difficulties in importing new weapons into my game, i have search the forums for tutorials and i have tried most of them but still having problems,
i have also tried the tutorial of adding a new flame thrower in from code3arena
with that tutorial i think i am close since i am getting a could not find weapon %n (=%n represent the number i have put it into my bank in my case 16"could not find item for weapon 16)

Please can someone go through a step by step process in helpiing me please. and finally close this discussion of adding new weapons for good
Hope to hear from ya :slight_smile:


(El Stupido) #2

Hmm wild guess: Have you added your weapon to the itemlist in bg_misc.c?


(=>ETK<=Elite) #3

Hmm… just search through all the code for a weapon similar to the one your adding (ie, handgun do a search for colt, smg do a search for thompson) and add in the appropriate entries for your new weapon. Some places of code are either dead or bot code, but just add it in everywhere to make sure unless you know something won’t be called/used anywhere, and some other piece of code doesn’t expect it there even though it won’t be used. Be very careful with the arrays though, and make sure the elements of the arrays are in the proper order when necessary.

Once you got all you WP_weaponname/WS_weaponname code in place, just compile it all up and place the models and sounds in the approriate folder (models/weapons2/weaponname, sounds/weapons, etc), then edit human_base.script to accomodate the new weapon, then create the pk3 and you should be set.