I couldn't find any good forums or ideas on how to implement on the melee animation script but then I got into UDK forums itself, helped me in some ways but still had lots to do compared to the original work we fit into. I wanted to make a simple melee attack for just a single character, but it had a lot of crashes and bugs over the game engine and I figured that it was no use of embedding this semester with such features so I decided to continue this next year as a part of my final portfolio for my assignment.
Here are some bits of I've been working on a melee weapon, a lightsaber to be precise. I can't figure out how to make it play a 'melee animation' in third person. I figured I could make it do the "hoverboardjumpstart" animation, since it looks like a melee attack. I apparently had to animate the player instead of the weapon in order for this to work in third person. Here's the weapon code which I referenced:
class FFWeap_saber1 extends starwarsweapon;
var rotator pawndir;
var name AttachmentSocket;
var name WeaponAttachmentSocketName;
var SkeletalMeshComponent WeaponMesh;
defaultproperties
{
AttachFlashLightInterval=1.25
OnFlashLightInterval=0.65 // "WeaponLightSwitch"
AttachKolInterval=2.35 //
ReloadInterval=12.290000 //
bHasIronSights=false
WeaponSlincerOnAnim="SupON" //
WeaponSlincerOffAnim="SupOFF" //
//bKollimator = false //
EmptyReloadInterval=32.200000 //
RunStartInterval=0.200000 //
RunEndInterval=0.200000 //
ClipCount=39999 //
RecoilAmount=18
AmmoCount=9999 //
MaxAmmoCount=999999
WeaponRange=1
bPrimaryWeapon=True
PlayerViewOffset=(X=5.0,Y=2.5,Z=-4.5)
IronSightViewOffset=(X=-0.35,Y=-3.1,Z=-4.15)
IronSightViewOffset1=(X=2.35,Y=-3.15,Z=-3.3)
ReloadCameraAnim=CameraAnim'WP_MP5.CameraAnims.C_WP_MP5_ReloadEmptyMotion'
ReloadEmptyCameraAnim=CameraAnim'WP_MP5.CameraAnims.C_WP_MP5_ReloadMotion'
ReloadSound=SoundCue''
ReloadEmptySound=SoundCue''
FireCameraAnim(0)=CameraAnim''
InventoryGroup=3
AttachmentClass=Class'FFAttach_MP5'
InventoryGroup=2
AttachmentClass=Class'FSWeaponAttachment'
AttachmentClass=Class'attach_saber1'
WeaponFireSnd(0)=SoundCue''
WeaponPutDownSnd=SoundCue''
WeaponEquipSnd=SoundCue'Package_1.weaponsound.saberignite1_Cue'
FlashLightSwitchSnd=SoundCue''
MuzzleFlashPSCTemplate=ParticleSystem'WP_ShockRifle.Particles.P_WP_ShockRifle_Beam'
MuzzleFlashLightClass=Class'FF_MP5_MuzzleFlashLight'
MuzzleFlashDuration=0.5100000
aimerror=600.000000
// WeaponFireTypes(0)=EWFT_InstantHit
// WeaponFireTypes(1)=EWFT_None
FireInterval(0)=1.36190000
ShotCost(0)=1
Spread(0)=0.060000
// InstantHitDamage(0)=30.000000
// InstantHitMomentum(0)=1000.000000
// InstantHitDamageTypes(0)=Class'FFDmgType_MP5'
// RotChgSpeed=3.0
// ReturnChgSpeed=3.0
// EquipTime=0.7
// PutDownTime=0.5
// bInstantHit=True
// Begin Object class=AnimNodeSequence Name=hoverboardltjumpstart
// End Object
Begin Object Name=SkeletalMeshComponent0
SkeletalMesh=SkeletalMesh'CodaTest.CodaSwordShape'
// AnimSets(0)=AnimSet'CH_AnimHuman.Anims.K_AnimHuman_BaseMale'
// AnimTreeTemplate=AnimTree'CH_AnimHuman_Tree.AT_CH_Human'
//Animations=hoverboardltjumpstart
Translation=(Z=1)
Rotation=(Roll=-400)
Scale=0.9
Scale3D=(X=0.340562,Y=1.000000,Z=1.000000)
WeapAnimType=EWAT_Pistol
End Object
Components.Add(SkeletalMeshComponent0)
Mesh=SkeletalMeshComponent0
WeaponFireSnd[0]=SoundCue'Package_1.weaponsound.saberswing1_Cue'
// WeaponIdleAnims[0] = 'hoverboardjumpstart';
Scale3D=(X=0.340562,Y=1.000000,Z=1.000000)
MuzzleFlashSocket=MF
MuzzleFlashPSCTemplate=WP_ShockRifle.Particles.P_ShockRifle_MF_Alt
MuzzleFlashAltPSCTemplate=WP_ShockRifle.Particles.P_ShockRifle_MF_Alt
MuzzleFlashColor=(R=200,G=120,B=255,A=255)
MuzzleFlashDuration=0.33
MuzzleFlashLightClass=class'UTGame.UTShockMuzzleFlashLight'
CrossHairCoordinates=(U=256,V=0,UL=64,VL=64)
LockerRotation=(Pitch=32768,Roll=16384)
IconCoordinates=(U=728,V=382,UL=162,VL=45)
WeaponColor=(R=160,G=0,B=255,A=255)
bAutoCharge=true
RechargeRate=0.0
FireOffset=(X=12,Y=10,Z=-10)
WeaponProjectiles(0)=class'lightsabershot' // UTProj_LinkPowerPlasma if linked (see GetProjectileClass() )
EffectSockets(0)=MuzzleFlashSocket
EffectSockets(1)=MuzzleFlashSocket
MuzzleFlashSocket=MuzzleFlashSocket
MuzzleFlashPSCTemplate=ParticleSystem'WP_LinkGun.Effects.P_FX_LinkGun_MF_Primary'
MuzzleFlashAltPSCTemplate=ParticleSystem'WP_LinkGun.Effects.P_FX_LinkGun_MF_Beam'
bMuzzleFlashPSCLoops=true
MuzzleFlashLightClass=class'UTGame.UTLinkGunMuzzleFlashLight'
WeapAnimType=EWAT_Pistol
//begin object Name=KollimatorMesh
/// SkeletalMesh=SkeletalMesh'WP_MP5.Mesh.Kollimator_SK'
// scale=1.0
// FOV=55.0
//end object
//KollimatorAttachment=KollimatorMesh
//Begin Object Name=FlashLightComponent
// Begin Object Class=LightFunction Name=MyLightFunction
// SourceMaterial=Material'WP_MP5.Materials.M_FFWeapon_Flashlight_Ring'
// Scale=(X=240.000000,Y=240.000000,Z=240.000000)
// End Object
// InnerConeAngle=22.000000
// OuterConeAngle=30.000000
// Radius=600.000000
// Brightness=1.500000
// LightColor=(B=230,G=255,R=255,A=0)
// Function=MyLightFunction
// End Object
// FlashLightAttachment=FlashLightComponent
// Begin Object Name=PickupMesh
// SkeletalMesh=SkeletalMesh'WP_MP5.Mesh.WP_SK_MP5_3P'
// Translation=(Z=1)
// Rotation=(Roll=-400)
// Scale=0.9
// End Object
// PickupFactoryMesh=PickupMesh
}
Referenced from: http://forums.epicgames.com/
Here are some bits of I've been working on a melee weapon, a lightsaber to be precise. I can't figure out how to make it play a 'melee animation' in third person. I figured I could make it do the "hoverboardjumpstart" animation, since it looks like a melee attack. I apparently had to animate the player instead of the weapon in order for this to work in third person. Here's the weapon code which I referenced:
class FFWeap_saber1 extends starwarsweapon;
var rotator pawndir;
var name AttachmentSocket;
var name WeaponAttachmentSocketName;
var SkeletalMeshComponent WeaponMesh;
defaultproperties
{
AttachFlashLightInterval=1.25
OnFlashLightInterval=0.65 // "WeaponLightSwitch"
AttachKolInterval=2.35 //
ReloadInterval=12.290000 //
bHasIronSights=false
WeaponSlincerOnAnim="SupON" //
WeaponSlincerOffAnim="SupOFF" //
//bKollimator = false //
EmptyReloadInterval=32.200000 //
RunStartInterval=0.200000 //
RunEndInterval=0.200000 //
ClipCount=39999 //
RecoilAmount=18
AmmoCount=9999 //
MaxAmmoCount=999999
WeaponRange=1
bPrimaryWeapon=True
PlayerViewOffset=(X=5.0,Y=2.5,Z=-4.5)
IronSightViewOffset=(X=-0.35,Y=-3.1,Z=-4.15)
IronSightViewOffset1=(X=2.35,Y=-3.15,Z=-3.3)
ReloadCameraAnim=CameraAnim'WP_MP5.CameraAnims.C_WP_MP5_ReloadEmptyMotion'
ReloadEmptyCameraAnim=CameraAnim'WP_MP5.CameraAnims.C_WP_MP5_ReloadMotion'
ReloadSound=SoundCue''
ReloadEmptySound=SoundCue''
FireCameraAnim(0)=CameraAnim''
InventoryGroup=3
AttachmentClass=Class'FFAttach_MP5'
InventoryGroup=2
AttachmentClass=Class'FSWeaponAttachment'
AttachmentClass=Class'attach_saber1'
WeaponFireSnd(0)=SoundCue''
WeaponPutDownSnd=SoundCue''
WeaponEquipSnd=SoundCue'Package_1.weaponsound.saberignite1_Cue'
FlashLightSwitchSnd=SoundCue''
MuzzleFlashPSCTemplate=ParticleSystem'WP_ShockRifle.Particles.P_WP_ShockRifle_Beam'
MuzzleFlashLightClass=Class'FF_MP5_MuzzleFlashLight'
MuzzleFlashDuration=0.5100000
aimerror=600.000000
// WeaponFireTypes(0)=EWFT_InstantHit
// WeaponFireTypes(1)=EWFT_None
FireInterval(0)=1.36190000
ShotCost(0)=1
Spread(0)=0.060000
// InstantHitDamage(0)=30.000000
// InstantHitMomentum(0)=1000.000000
// InstantHitDamageTypes(0)=Class'FFDmgType_MP5'
// RotChgSpeed=3.0
// ReturnChgSpeed=3.0
// EquipTime=0.7
// PutDownTime=0.5
// bInstantHit=True
// Begin Object class=AnimNodeSequence Name=hoverboardltjumpstart
// End Object
Begin Object Name=SkeletalMeshComponent0
SkeletalMesh=SkeletalMesh'CodaTest.CodaSwordShape'
// AnimSets(0)=AnimSet'CH_AnimHuman.Anims.K_AnimHuman_BaseMale'
// AnimTreeTemplate=AnimTree'CH_AnimHuman_Tree.AT_CH_Human'
//Animations=hoverboardltjumpstart
Translation=(Z=1)
Rotation=(Roll=-400)
Scale=0.9
Scale3D=(X=0.340562,Y=1.000000,Z=1.000000)
WeapAnimType=EWAT_Pistol
End Object
Components.Add(SkeletalMeshComponent0)
Mesh=SkeletalMeshComponent0
WeaponFireSnd[0]=SoundCue'Package_1.weaponsound.saberswing1_Cue'
// WeaponIdleAnims[0] = 'hoverboardjumpstart';
Scale3D=(X=0.340562,Y=1.000000,Z=1.000000)
MuzzleFlashSocket=MF
MuzzleFlashPSCTemplate=WP_ShockRifle.Particles.P_ShockRifle_MF_Alt
MuzzleFlashAltPSCTemplate=WP_ShockRifle.Particles.P_ShockRifle_MF_Alt
MuzzleFlashColor=(R=200,G=120,B=255,A=255)
MuzzleFlashDuration=0.33
MuzzleFlashLightClass=class'UTGame.UTShockMuzzleFlashLight'
CrossHairCoordinates=(U=256,V=0,UL=64,VL=64)
LockerRotation=(Pitch=32768,Roll=16384)
IconCoordinates=(U=728,V=382,UL=162,VL=45)
WeaponColor=(R=160,G=0,B=255,A=255)
bAutoCharge=true
RechargeRate=0.0
FireOffset=(X=12,Y=10,Z=-10)
WeaponProjectiles(0)=class'lightsabershot' // UTProj_LinkPowerPlasma if linked (see GetProjectileClass() )
EffectSockets(0)=MuzzleFlashSocket
EffectSockets(1)=MuzzleFlashSocket
MuzzleFlashSocket=MuzzleFlashSocket
MuzzleFlashPSCTemplate=ParticleSystem'WP_LinkGun.Effects.P_FX_LinkGun_MF_Primary'
MuzzleFlashAltPSCTemplate=ParticleSystem'WP_LinkGun.Effects.P_FX_LinkGun_MF_Beam'
bMuzzleFlashPSCLoops=true
MuzzleFlashLightClass=class'UTGame.UTLinkGunMuzzleFlashLight'
WeapAnimType=EWAT_Pistol
//begin object Name=KollimatorMesh
/// SkeletalMesh=SkeletalMesh'WP_MP5.Mesh.Kollimator_SK'
// scale=1.0
// FOV=55.0
//end object
//KollimatorAttachment=KollimatorMesh
//Begin Object Name=FlashLightComponent
// Begin Object Class=LightFunction Name=MyLightFunction
// SourceMaterial=Material'WP_MP5.Materials.M_FFWeapon_Flashlight_Ring'
// Scale=(X=240.000000,Y=240.000000,Z=240.000000)
// End Object
// InnerConeAngle=22.000000
// OuterConeAngle=30.000000
// Radius=600.000000
// Brightness=1.500000
// LightColor=(B=230,G=255,R=255,A=0)
// Function=MyLightFunction
// End Object
// FlashLightAttachment=FlashLightComponent
// Begin Object Name=PickupMesh
// SkeletalMesh=SkeletalMesh'WP_MP5.Mesh.WP_SK_MP5_3P'
// Translation=(Z=1)
// Rotation=(Roll=-400)
// Scale=0.9
// End Object
// PickupFactoryMesh=PickupMesh
}
Referenced from: http://forums.epicgames.com/
No comments:
Post a Comment