• Please make sure you are familiar with the forum rules. You can find them here: https://forums.tripwireinteractive.com/index.php?threads/forum-rules.2334636/

Code M2 Carbine Weapon (Mod-New Weapon)

Okay So I've been working on an M2 Carbine. It's a new weapon, and not an upgrade for the M1 Carbine (Honestly considering that I've only seen three upgrades on any weapon, I'd rather not risk running into problems by creating an additional upgrade). It's functioning fine, except for the recoil & Particle FX when the bullets hit objects in game, both of which I'm a little confused on why they aren't working. I've successfully tested it, it works fine, except for these issues. I'm new to coding, first time I've ever bothered to code something. Any help would appreciated on solving these problems.
 
Yeah, sorry for not being specific enough. I'm not still not sure why the Bullet Collisions don't work. Getting to the point, it's majority of it renamed M1 files, with modified code for the M2, it has only one upgrade, the basic one. It does use all the same animations and the same base model as the M1 Carbine. I copied the M1 files mostly, and modified them when needed, so the RSDmgType_M2CarbineBullet.uc & M2CarbineBullet.uc are renamed files basically, besides for editing the references in them. In the future perhaps someone can help me create the M2's clip.
 
Last edited:
Upvote 0
Do you have a cloned model? Because you would need to create a socket for the barrel and casings.. when you open the model in the SDK, look for the icon for Socket Manager - and compare the entries with those of another 1st person weapon mesh.

If you are using the exact same model file this isn't an issue, and at that point I'd suggest to try just using the M1 Carbine projectiles.
 
Last edited:
Upvote 0
Do you have a cloned model? Because you would need to create a socket for the barrel and casings.. when you open the model in the SDK, look for the icon for Socket Manager - and compare the entries with those of another 1st person weapon mesh.

If you are using the exact same model file this isn't an issue, and at that point I'd suggest to try just using the M1 Carbine projectiles.

Yeah So I'm not exactly sure, what you mean. The models are identical to the M1 Carbine, they're also referenced in the code as the same model. So I assume they are the same model, by what you mean. The M1 carbine projectile file is identical, just renamed and referenced to the M2 files (Pretty much changed "M1" to "M2" and saved it, after renaming the files themselves to say M2 instead of M1).
I've tested it on a map, haven't brewed the modified map, but I have played it in the SDK, and tested it on some bots, it does deal damage and Gore FX, but no bullet holes or collision animations on meshes, and such.
 
Upvote 0
It would need a new animation or you may have to modify the speed of the existing anim (which can only be done by creating a new animset cloned from the old one.)

If you're not using a new model or changing anything regarding the projectile, I have no idea why projectiles aren't showing hit effects on the world. You can't test this on a normal map?
 
Upvote 0
If you edit any file you'll have to brew - and changing references involves editing the weapon class.

To change animation speed you'll need to clone your animset to a new .upk within the SDK and then find the animations you want to change, and modify their rate or timescale (I forget the property name.) Once you do that you'll just have to save said .upk, and I think you may need to brew again (not really sure about when you do / don't have to brew, generally I just do it any time I change any thing.
 
Upvote 0
M2 Carbine in Action!

M2 Carbine in Action!

http://youtu.be/6L_XmJahlkQ
Some in game footage of me fooling around with the M2 Carbine.
It's Raw unedited footage...So don't get mad at watching a loading screen for a second or two.
I nerfed the fire rate, as it orignally and historically ate through an entire clip in less than three seconds, it needs some tweaking but its done in the aspect that it can be used.
I'll attempt to use 3DS Max, and try to learn how to use and re-make the clip at the same time.... That can't go wrong :rolleyes:
 
Last edited:
Upvote 0