Announcement

Collapse
No announcement yet.

PlayHitEffects Problem

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • replied
    Good ^^.

    10chars

    Leave a comment:


  • replied
    LEGEND! That fixed it! Thanks RattleSn4k3

    Leave a comment:


  • replied
    Try spawning the emitter without the owner "self"... what happens then? I could think of bOwnerNoSee or something like that interfering the visiblity.

    Leave a comment:


  • replied
    Well i checked my Family classes that extend off UTFamilyInfo. Both my Pawn and the enemy pawns are using the same set of particles:
    Code:
     BloodEffects[0]=(Template=ParticleSystem'T_FX.Effects.P_FX_Bloodhit_Corrupt_Far',MinDistance=750.0)
    	BloodEffects[1]=(Template=ParticleSystem'T_FX.Effects.P_FX_Bloodhit_Corrupt_Mid',MinDistance=350.0)
    	BloodEffects[2]=(Template=ParticleSystem'T_FX.Effects.P_FX_Bloodhit_Corrupt_Near',MinDistance=0.0)
    So there can't be anything wrong with them...

    Leave a comment:


  • replied
    Maybe it's something with the visibilty of the particle , perhaps you could use a different particle no ?

    Leave a comment:


  • started a topic PlayHitEffects Problem

    PlayHitEffects Problem

    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:
    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);
    						
    	}
    }
    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
Working...
X