compiling weapons

Stertman

Newbie
Joined
Mar 24, 2005
Messages
128
Reaction score
0
how does this work?
I have made a gun, and made an shoot, reload, walk, pickup and idle animation for it.. should i export this as "gun_shoot.smd" or something? and do that for every animation, and then should i make a "gun_ref" and a "gun_phys" without the hands and export those?
Im a bit lost here..

any help would be awsome =)
 
There isnt any really good tutorials for it as far as I know, Its quite a long drawn out process.. Id like to beable to do this, its just compiling issue's for me, I know the modelling and animation aspect of it. I know you do need the hands in the scene you have to rig it all as one, and it doesnt need to have a collision model.

You export all the animations seperately, reference, idle, reload, fire.. etc, then its all about setting the compile up specifically in the QC for the engine to use. Then to use it in game you need to code the weapons function (specifying what animation plays when certain commands are given and the time duration of the function) or modify existing weapon code.

But id also like some easier to follow tuts or video tuts for the compiling process.
 
hey, common,, there must be a bounch of guys on this forum who knows how to do it?.. please?
 
ive got a weapon tutorial that will be going on gonzos website. are you using xsi? i pressume you want to replace the original pistol. so i think the animations need to be the same amount of frames as the original weapon. look at the model viewer for reference. anyway yeah if you go to sourcesdk_content\hl2\weapons\v_pistol youll find the qc file. so name all the files according to that. the ref needs to be the gun and the hands. you dont need a phys smd. there are lots more animations for the pistol. you can either make custom ones of these or edit the qc file. then youll probally want to compile a world model for it i.e w_pistol. of a low poly version of the gun.

heres the qc file to save you time.

*/

$modelname weapons/v_Pistol.mdl
$cdmaterials models\Weapons\V_hand models\Weapons\V_Pistol


// whole body
$body studio "Pistol_reference.smd"

$origin 0 0 68

//Muzzle flash
$attachment "muzzle" "ValveBiped.muzzle" 0 0 0

//Shell eject
$attachment "1" "ValveBiped.eject" -1.00 0.00 0.00 rotate -0 90 -180

$sequence idle01 "Idle01" loop fps 30 activity ACT_VM_IDLE 1 node 0
$sequence idle01empty "Idle01_empty" loop fps 30 activity ACT_VM_IDLE_EMPTY 1 node 0
$sequence fire "Fire" snap fps 30 activity ACT_VM_PRIMARYATTACK 1 { event AE_MUZZLEFLASH 0 "PISTOL MUZZLE" } node 2
$sequence fire1 "Fire1" snap fps 30 activity ACT_VM_RECOIL1 1 { event AE_MUZZLEFLASH 0 "PISTOL MUZZLE" } node 2
$sequence fire2 "Fire2" snap fps 30 activity ACT_VM_RECOIL2 1 { event AE_MUZZLEFLASH 0 "PISTOL MUZZLE" } node 2
$sequence fire3 "Fire3" snap fps 30 activity ACT_VM_RECOIL3 1 { event AE_MUZZLEFLASH 0 "PISTOL MUZZLE" } node 2
$sequence fireempty "Fire_empty" fps 30 activity ACT_VM_DRYFIRE 1 node 2
$sequence draw "Draw" snap fps 30 activity ACT_VM_DRAW 1 node 0
$sequence drawempty "Draw_empty" fps 30 node 0
$sequence reload "Reload" fps 30 activity ACT_VM_RELOAD 1 node 0
$sequence holster "Holster" fps 30 activity ACT_VM_HOLSTER 1 node 0
$sequence holsterempty "Holster_empty" fps 30 activity ACT_VM_HOLSTER 1 node 0
$sequence idletolow "idle_to_lowered" fps 30 activity ACT_VM_LOWERED_TO_IDLE 1 transition 0 1
$sequence lowtoidle "lowered_to_idle01" fps 30 activity ACT_VM_IDLE_TO_LOWERED 1 transition 1 0
$sequence lowidle "idle01_lowered" fps 30 loop activity ACT_VM_IDLE_LOWERED 1 node 1
 
What would be the size the weapon needs to be scaled to in units? Also do the hands, and any other accessories share the same UV space as the gun?
 
scale the model according to hl2 weapon models or hl2 hand models . the hand models do not share the same uvw space that would be quite inconvenient.
 
well essentially its up to you but that wouldnt make much sense. you could add biped guide to use as reference for sizing. make the arms the size of the biped arms etc.
 
there arnt any or atleast any that i know of. and it has been explained on this thread.
 
Back
Top