Saturday, 11 February 2012
attachment class- custom weapon
class AttachmentClass_ak extends UTWeaponAttachment;
var ParticleSystem BeamTemplate;
var int CurrentPath;
simulated function SetMuzzleFlashParams(ParticleSystemComponent PSC)
{
local float PathValues[3];
local int NewPath;
Super.SetMuzzleFlashparams(PSC);
if (Instigator.FiringMode == 0)
{
NewPath = Rand(3);
if (NewPath == CurrentPath)
{
NewPath++;
}
CurrentPath = NewPath % 3;
PathValues[CurrentPath % 3] = 1.0;
PSC.SetFloatParameter('Path1',PathValues[0]);
PSC.SetFloatParameter('Path2',PathValues[1]);
PSC.SetFloatParameter('Path3',PathValues[2]);
// CurrentPath++;
}
else if (Instigator.FiringMode == 3)
{
PSC.SetFloatParameter('Path1',1.0);
PSC.SetFloatParameter('Path2',1.0);
PSC.SetFloatParameter('Path3',1.0);
}
else
{
PSC.SetFloatParameter('Path1',0.0);
PSC.SetFloatParameter('Path2',0.0);
PSC.SetFloatParameter('Path3',0.0);
}
}
defaultproperties
{
// Weapon SkeletalMesh
Begin Object Name=SkeletalMeshComponent0
SkeletalMesh=SkeletalMesh'my_weapons.ak.AK_Tuorial'
End Object
DefaultImpactEffect=(ParticleTemplate=ParticleSystem'Weapon_1_Mesh.P_WP_SniperRifle_Surface_Impact',Sound=SoundCue'Weapon_1_Mesh.AR_Impact')
BulletWhip=SoundCue'A_Weapon_ShockRifle.Cue.A_Weapon_SR_WhipCue'
MuzzleFlashSocket=MuzzleFlashSocket
MuzzleFlashPSCTemplate=VH_Scorpion.Effects.PS_Scorpion_Gun_MuzzleFlash_Red
MuzzleFlashAltPSCTemplate=VH_Scorpion.Effects.PS_Scorpion_Gun_MuzzleFlash_Red
MuzzleFlashColor=(R=200,G=0,B=0,A=255)
MuzzleFlashDuration=0.33;
MuzzleFlashLightClass=class'M16.M16_MuzzleFlash'
WeaponClass=class'ak'
}
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment