Muzzleflashes doesn´t appear in game

Need help Modeling Props and Physical Objects for your Maps.
Post Reply
MaestraFénix
Team Member
Team Member
Posts: 2470
Joined: Mon May 10, 2010 11:50 am
Location: Spain
Contact:

Muzzleflashes doesn´t appear in game

Post by MaestraFénix »

I´m fixing the DOD:S weapons for OC, and, although i fixed some bugs (like the 30cal doesn´t reloading), i´m unable to fix the muzzleflashes.

Everything appears ok: the bones, the attachments, the coordinates, the grammar...but doesn´t appear in game. Doesn´t have muzzleflashes both the view and the world models.

This is the QC file of a world model as example (MG42):

Code: Select all

$cd "C:\Users\****\Desktop\Nueva carpeta\mg42"
$modelname "weapons\w_mg42bu.mdl"
$model "studio" "w_mg42bu_ref1.smd"
$cdmaterials "models\weapons\w_models\mg42\"

// Model uses material "w_mg42.vmt"
$attachment "muzzle_flash" "ValveBiped.Weapon_bone" 24.00 1.00 -4.00 rotate 10.00 -0.00 -90.00
$attachment "1" "ValveBiped.Weapon_bone" -3.50 2.00 0.70 rotate 45.00 90.00 -90.00
$surfaceprop "weapon"
$illumposition 3.124 -14.236 2.013
$sequence w_mg42bu_idle "w_mg42bu_idle1" fps 1.00
$sequence w_mg42bu_shoot "w_mg42bu_shoot1" ACT_RANGE_ATTACK_AR2 1 fps 100.00 {
  { event AE_MUZZLEFLASH 0 "SMG1 MUZZLE" }
  { event 3002 0 }
  { event 6001 0 "0" }
}

$collisionmodel "phymodel.smd" {

	$mass 8.0
	$inertia 1.00
	$damping 0.00
	$rotdamping 0.00
}
Anyone have an idea?
Click on my photo to add me into your friends in Steam
Image
Steam photos | Steam videos

Image
MaestraFénix
Team Member
Team Member
Posts: 2470
Joined: Mon May 10, 2010 11:50 am
Location: Spain
Contact:

Re: Muzzleflashes doesn´t appear in game

Post by MaestraFénix »

No one knows what it could be the reason?
Click on my photo to add me into your friends in Steam
Image
Steam photos | Steam videos

Image
User avatar
TESLA-X4
Former Developer
Former Developer
Posts: 570
Joined: Wed Jul 01, 2009 3:26 pm
Location: $Recycle.Bin

Re: Muzzleflashes doesn´t appear in game

Post by TESLA-X4 »

Unfortunately, I can't help you with this due to my lack of experience with models.
Apparently, Valve can't make games beyond the number 2.
I think the only time we'll get a Source SDK code update is when it starts having purchasable hats integrated, i.e. hatconomy.

Please do not make assumptions you are not knowledgeable enough to make - that just backfires on yourself.
Tick me off, and I'll be sure to give you the golden treatment. Haven't you heard? Silence is golden.
Gary
npc_advisor
npc_advisor
Posts: 1125
Joined: Sun Nov 09, 2008 7:21 am
Location: USA, FL
Contact:

Re: Muzzleflashes doesn´t appear in game

Post by Gary »

I know QCs, I can't model for shit.

Code: Select all

 { event AE_MUZZLEFLASH 0 "SMG1 MUZZLE" } 
Looking in code, you pass the animation event AE_MUZZLEFLASH two tokens. First, the effect type, then the attachment name.

The attachment name you passed it was "muzzle", yet you don't have an attachment named that defined... though, you do have an attachment named "muzzle_flash" defined. I assumed you just overlooked it. So, try changing:

Code: Select all

 { event AE_MUZZLEFLASH 0 "SMG1 MUZZLE" } 
To:

Code: Select all

 { event AE_MUZZLEFLASH 0 "SMG1 muzzle_flash" } 
Oh, and since I went through the trouble(how ever little it was), I might as well list the muzzle flashes that are defined in code:
"COMBINE"
"SMG1"
"PISTOL"
"SHOTGUN"
"357"
"RPG"
MaestraFénix
Team Member
Team Member
Posts: 2470
Joined: Mon May 10, 2010 11:50 am
Location: Spain
Contact:

Re: Muzzleflashes doesn´t appear in game

Post by MaestraFénix »

It worked. Thanks. I was unable to see why in a model worked fine but not in the other.
Click on my photo to add me into your friends in Steam
Image
Steam photos | Steam videos

Image
Post Reply