Here is a tutorial by CCPVI
He asked me to fix a little of the grammer, since he normally speaks German. (but knows english VERY well)
This tutorial shows you how to attach staticmeshes to meshes of animations. This is
quite useful to make modweapons as you can attach weaponstaticmeshes to hudarms.
First of all you have to choose a staticmesh you want to make to a weapon. I took the
droid blaster. You'll find it in the staticmeshbrowser at weapons -> droid -> droidblaster.
Select the staticmesh.
We can't attach the staticmesh to the animation directly. The way we attach them works
only with emitters(also called particle systems. things like fire-effects,rain,etc.).
So we will make a emitter with the looking of our staticmesh.
Go to the actor class browser and right click on emitter. Then leftklick "new...". Then
you have to designate the package and the name of the actor. I named the package WeaponActors and
the name DroidBlasterStaticMesh. The name doesn't really matter. After that the properties
of the new actor should appear. Go to display and set bUnlit to False( otherwise your
weapon will glare) and then go to displayadvanced and set drawtype to DT_StaticMesh
and fill the right staticmesh in.
You can edit the properties when you got to the actor browser.
Now it's getting a bit complicated. Go to the animationsbrowser. Open the package HudArms
and an animation which looks good to a droidblaster. The droidblaster is a quite small
weapon and it doesn't fit good to a blasteranimation so I took the pistolanimation.
Select the pistolanimationset.
It would be easier to edit this animation but then you wouldn't be able to join servers
anymore. Because of that i'll show you how to make a new animationpackage.
Go to animation-> rename animationset.
A window in which you have to name the package and the new animationset appears.
Then you have to do the same with the mesh. go to mesh -> rename mesh and save it. The name of the package should
be the same like the one of the animationset you've saved. then you can open your new package.
(IMPORTANT: when you quit the editor don't overwrite the original animation from which you've taken the mesh and the animation.)
Open your new animation package and select the "load" animation. We have to take the animation at which the weapon should appear.
As the weapon should be there from the beginning we choose the loadanimation and take one of the first frames(0.00001)
or something like that.
Go to AnimationNotify on the right side and add the animnotify_effect.
Select your emitter. In my case it's DroidBlasterStaticMesh.
Then you can select at which frame, to which bone, location and rotation the emitter should be attached.
Don't make 2 Anim_notifies with the same frame. I don't know why but it makes trouble.
I'd use the bone weaponattach_r. set "attach" always to true. The tag is not important. In case of the droidblaster the location
direction should fit. Otherwise you could change it with "location" and "rotation".
You can use it for the AnimNotify_destroyeffect.
You have to make the original weapon invisible. In this case that'd be the DC 15s.
Make an invisible texture or use an existing one("FinalBlend'HUDTextures.Effects.DefaultInvisib le'" for example)
and use it instead of the original DC15s Texture.
That's all. The new weapon is not visible in the editor but ingame you'll see it.
(Hockey's note- you will see it if you play the load anim with the "reapeat" off)
Xfire me if you got any questions. (xfire=viscatus)