Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: [Tutorial] Adding 'punching' by weapon ala Crysis  (Read 2338 times)

0 Members and 1 Guest are viewing this topic.

Offline Igoreso

  • *
  • +1% chance to make useful post
  • Igoreso has no influence.
[Tutorial] Adding 'punching' by weapon ala Crysis
« on: August 12, 2010, 04:09:17 PM »
You might've seen it in Crysis or Eternal Silence mod for HL2.
I took one weapon viewmodel from Eternal Silence and wrote that script.
Below is most important part of weapon script file.
You can download weapon here (please reupload it to where you think it's appropriate and post a link).
This will replace weapon_custom30.
You only need to include game_sounds_weapons_ESmod.txt in game_sounds_manifest.txt.
Known bugs: punching won't disable ironsight or laser pointer.

Code: [Select]
"WeaponSpec"
{
// "WeaponType" "1" // I'm not sure, commented this out
"FireRate" "0.1"
"FireMode" "4" // Automatic rifle

...

"Melee" {
"Secondary" {
"Range" "75"
"Frame" "0" // 10
"NextAttack" "35"
"Damage" "15"
"DamageType" "DMG_CLUB"
}
"Force" "0.5"
"ImpactEffect" "1" // 0:default 1:nodecal 2:nodecal,nosound 3:noeffect
"Decal" "ManhackCut"
}

"Activities" {
"Idle" "ACT_VM_IDLE"
"PrimaryFire" "ACT_VM_PRIMARYATTACK"
"SecondaryFire" "ACT_VM_HITCENTER"
}

Waiting for replies! :)

Offline BIZ

  • 32-Bit Hobo
  • *
  • *
  • +0% chance to make useful post
  • BIZ hides in shadows.
    • BSNOOCH.COM
Re: [Tutorial] Adding 'punching' by weapon ala Crysis
« Reply #1 on: August 13, 2010, 12:36:35 AM »
is this a tutorial or a release?

Offline Igoreso

  • *
  • +1% chance to make useful post
  • Igoreso has no influence.
Re: [Tutorial] Adding 'punching' by weapon ala Crysis
« Reply #2 on: August 13, 2010, 04:50:31 PM »
I dunno :p. It wasn't hard to find and it isn't hard to do so I guess it's not a tutorial. Model is not mine so it's not a release. "Pro Tip" maybe?