This works fine on my enemy pawns, but when my player pawn is hurt no particle effects spawn. I'm not sure why. I've even changed the Dmgtype received from my enemies to be the same as the one I'm inflicting on them, but it still doesn't spawn a particle effect when my pawn is hurt.
In my pawn's PlayTakeHitEffects() I have this:
All my debug messages look correct. There is nothing that equals none. I've looked through my default properties and I can't see anything that would prevent particle effects being spawned.
Any help please?
Thanks
In my pawn's PlayTakeHitEffects() I have this:
Code:
simulated function PlayTakeHitEffects() { local class<UTDamageType> UTDamage; local vector BloodMomentum; local UTEmit_HitEffect HitEffect; local ParticleSystem BloodTemplate; UTDamage = class<UTDamageType>(LastTakeHitInfo.DamageType); if ( UTDamage.default.bCausesBlood) { BloodTemplate = class'UTEmitter'.static.GetTemplateForDistance(GetFamilyInfo().default.BloodEffects, LastTakeHitInfo.HitLocation, WorldInfo); if (BloodTemplate != None) { BloodMomentum = Normal(-1.0 * LastTakeHitInfo.Momentum) + (0.5 * VRand()); HitEffect = Spawn(GetFamilyInfo().default.BloodEmitterClass, self,, LastTakeHitInfo.HitLocation, rotator(BloodMomentum)); HitEffect.SetTemplate(BloodTemplate, true); HitEffect.AttachTo(self, LastTakeHitInfo.HitBone); DrawDebugSphere(LastTakeHitInfo.HitLocation,10,10,0,0,255,true); //DebugMessagePlayer("HitEffect?" @ HitEffect); //DebugMessagePlayer("BloodTemplate?" @ BloodTemplate); //DebugMessagePlayer("BloodMomentum?" @ BloodMomentum); //DebugMessagePlayer("momentum?" @ LastTakeHitInfo.Momentum); //DebugMessagePlayer("HitLocation?" @ LastTakeHitInfo.HitLocation); //DebugMessagePlayer("HitBone" @ LastTakeHitInfo.HitBone); //DebugMessagePlayer("Damage type?" @ UTDamage); } }
Any help please?
Thanks
Comment