Allar's Blog

Allar's Blog

HTWeapon: Part 5 - Dealing Damage

Video Version

Subject: HTWeapon: Part 5 - Dealing Damage
Skill Level: So easy a caveman can do it.
Run-Time: 5 minutes
Author: Michael Allar
Notes: How to make your weapon deal damage upon firing.

Written Version

Subject: HTWeapon: Part 5 - Dealing Damage
Skill Level: So easy a caveman can do it.
Author: Michael Allar
Notes: How to make your weapon deal damage upon firing.

Step 1: Modify your weapon's defaultproperties block

[csharp]defaultproperties
{
// Weapon SkeletalMesh
Begin Object Name=FirstPersonMesh
SkeletalMesh=SkeletalMesh'ALWPM16.Mesh.SKWPM161P'
AnimSets(0)=AnimSet'ALWPM16.Anims.KWPM161P'
Scale=1.0
FOV=60.0
End Object

// Pickup staticmesh
Begin Object name=PickupMesh
SkeletalMesh=SkeletalMesh'ALWPM16.Mesh.SKWPM163P'
End Object

PlayerViewOffset=(X=17,Y=10.0,Z=-8.0)

//This is what we have added here.

AmmoCount=9001
MaxAmmoCount=9001

InstantHitDamage(0)=25.0
InstantHitDamage(1)=500000.0
InstantHitMomentum(0)=1000.0
InstantHitMomentum(1)=1000000.0
}[/csharp]

Step 2: Done