How to Port Weapons From Unreal Engine to Garry's Mod

Hi,

I’m currently trying to make weapon sweps from Killing Floor but it’s not going well. Is there a way to use the default animations and bones in Garry’s Mod without having to re-rig and redo the animations? I’ve tried to do it that way, but the model appears over my head instead of being in the default view model position.

Thanks in advance.

P.S. I’ll post pictures later when I get home.

To my knowledge, uModel can export the animations if you press a certain button combination. I unfortuantely can’t remember the exact button combination that needs to be pressed, but I believe either Stiffy or Cra0kalo might know the button combination.

I’ve exported them and converted them to .smd format already, but I still need to figure out a way to get the view models to work properly.

Bump

You need to export each animation as a different SMD, then in the QC you need to write out the name of the animation itself.

EX: Let’s say you extracted the M99 AMR. You save each animation (as far as I remember, there was only the shooting, scoping, unscoping, and shooting while scoped animations). In your QC, you must use $animation with the animation’s SMD file name, then give the animation itself a name. Then compile the model and make sure there are no errors.

On the coding side, you have to set the view model to your compiled model name. On top of that, most SWeps bases use animations typically called “ACT_VM_RELOAD” and “ACT_VM_PRIMARYATTACK”, so it’d be easier to name each animation to correspond with these as to not make your life difficult in having to recode already-made SWeps bases just to suit your needs.

If the model works ingame it should be alright.
Add this in your .qc “$origin 0 0 0” and change those positions to your liking.

If your model is like turned 90 degrees use this : “$origin 0 0 0 -90
(change this value according the model : 90, -90, 180, -180)

For further information use this : https://developer.valvesoftware.com/wiki/$origin
Hope I helped you out :slight_smile: