Announcement

Collapse

The Infinity Blade Forums Have Moved

We've launched brand new Infinity Blade forums with improved features and revamped layout. We've also included a complete archive of the previous posts. Come check out the new Infinity Blade forums.
See more
See less

Blood from weapon fire?

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

    Blood from weapon fire?

    Hey guys, I could use some help...How do I have blood splatter when bullets hit my pawns?

    any help will be appreciated.

    #2
    Impact effect or decal?
    Check out the UTGame files.

    Decals on a model - static or skeletal - is not something I've done.
    It is certainly doable.
    Again, check out the UTGame files.

    Comment


      #3
      Add this to the PlayImpact effects of UTWeapon Attachment

      Code:
      if(Pawn(HitActor) != none)
                 {
                   WorldInfo.MyEmitterPool.SpawnEmitter(ProjExplosionTemplate, HitLocation, rotator(-HitNormal),);
                   PlaySound(SoundCue'A_Character_BodyImpacts.BodyImpacts.A_Character_BodyImpact_Bullet_Cue',true,,, HitLocation);
                 }
                      if(Pawn(HitActor) != none)
      		{
      			CheckHitInfo(HitInfo, Pawn(HitActor).Mesh, -HitNormal, NewHitLoc);
      		}
      or add it to your custom attachment class if you have one.

      Comment


        #4
        TheAgent, that is a nice solution, but I would put the spawn in the OnHit or TakeDamage clause of the pawn... that way you can have specialized emitters for each kind of pawn, green blood, ooze, or regular blood, etc. . That is just me tho, this would work as well

        Comment


          #5
          I was thinking of doing that for my game, as i will have different types of creatures, so both ways will work :]

          Comment


            #6
            I once got an effective gore system working without any code whatsoever - it was based entirely on the 'BloodEffects' values in a character's FamilyInfo. However when I try to replicate this in any other build of UDK (I am currently using 2010-05) it simply won't work. I've always wondered why gore is so difficult to implement in UDK...

            Comment


              #7
              For now, I use the play hit effects function on my Damage type...which works, thank gawd...The problem is that I created another PS for my creatures...

              I did as Shindawg suggested and added the blood effects to my Pawn class...Problem is when I shoot at my creatures, they still spawn regular blood.

              Comment


                #8
                i had been struggling with bloodsplatter too,untill looking at ut3 code about 2 weeks ago.i implemented it through the weapon attachment code as suggested in this thread,but have run into a couple of issues.
                first,the last bloodspray,the one that kills the player is always a blue checkered square.the rest are fine.
                second,if i change the name of the particle system in the attachment file nothing happens.i have to reference the origional particles and change the spray to red in cascade.
                any ideas?i use september 2010 edition of udk.

                Comment


                  #9
                  if i remember rightly the blood/gore is set in the FamilyInfo file

                  from the UT3 UTFamilyInfo.uc
                  Code:
                  	BloodEmitterClass=class'UTGame.UTEmit_BloodSpray'
                  	BloodSplatterDecalMaterial=MaterialInstanceTimeVarying'T_FX.DecalMaterials.MITV_FX_BloodDecal_Small01'
                  
                  	GibExplosionTemplate=ParticleSystem'T_FX.Effects.P_FX_gibexplode'
                  
                  	BloodEffects[0]=(Template=ParticleSystem'T_FX.Effects.P_FX_Bloodhit_01_Far',MinDistance=750.0)
                  	BloodEffects[1]=(Template=ParticleSystem'T_FX.Effects.P_FX_Bloodhit_01_Mid',MinDistance=350.0)
                  	BloodEffects[2]=(Template=ParticleSystem'T_FX.Effects.P_FX_Bloodhit_01_Near',MinDistance=0.0)
                  copied from the UDK UTFamilyInfo.uc
                  Code:
                  	BloodEmitterClass=class'UTGame.UTEmit_BloodSpray'
                  you think they cut something out !!!!!

                  but might help you along the way

                  Comment


                    #10
                    @ Geodav: THat is correct...I was able to put the Emmitter class in my Pawn classes...Then I copied and pasted "Function TakeHitEffects" or something...

                    WHere it says SpawnPlayhiteffetct(GetFamilyinfo().Default....

                    I just changed that to
                    SpawnPlayhiteffetct(Default....
                    Seeing as I had the blood emitter class in the default properties of the pawn.

                    Comment


                      #11
                      i have struggled long and hard to get the UTFamilyInfo to work with out any sucsess.i dont see how the pawn class is referencing the family class.whatever i change in the family class is never passed on to the pawn class.i have custom characters in the UTGame folder with familyinfo and characters in the my own folder which dont,and both work equally well in game except for gore.the only way i have managed to get gibbs is to alter UTPawn to use my mesh through PlayerReplicationInfo.
                      i said in my previous post that i got bloodspray to work through the weapon attachment class,my mistake,it was actually throught the weapons UTDamageType file.

                      Comment


                        #12
                        @ Gaz...actually U can have your family info properties in your pawn file...

                        Comment


                          #13
                          thanks Kelt'ar,i will experiment later.

                          Comment


                            #14
                            ive had no luck in incorporating the family info into the pawn class,perhaps you could spill the beans Kelt'ar,it would be much appreciated.

                            Comment


                              #15
                              Son of a...Sorry totally forgot...Will do when I get hime 2nite. I've been rebuilding my UPKs sinse my dumbass forgot to back them up when I deleted and tried to reinstall UDK

                              Comment

                              Working...
                              X