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

When Pawn Dies

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

  • When Pawn Dies

    I know that a lot of people posted that here, but I just don't figured out the problem here yet...

    So, I have a UDN Pawn extends from UTPawn....
    I Created a Death Animation....

    How to use this animation for ALL the Death Kinds of my game?

    I tried to find in UTPawn.uc how its works, but no success...

    I just wanna put my Death Animation for any kind of Player Death in my game...

    Can someone help? Script? Kismet? Anything?

    Thanks ^^

  • #2
    I did that by putting the following in my Pawn class (extends UTPawn):

    Code:
    simulated function PlayDying(class<DamageType> DamageType, vector HitLoc)
    {
    	SetCollisionType(COLLIDE_NoCollision);
    	FullBodyAnimSlot.SetActorAnimEndNotification(true);
    	FullBodyAnimSlot.PlayCustomAnim('Death_Stinger', 1.0, 0.05, -1.0, false, false);
    	LifeSpan=1.0;
    }

    Comment


    • #3
      Thanks man! With that udk didn't crash!

      But the camera (my game is 2.5D) change for the fisrt view, I suppose that is set on UTPawn too, right? Can someone say which part I most replace in my char file to fix a side camera ?

      Comment


      • #4
        Can someone help?

        The code helps my UDK to not close, but now always happen this:

        When HP reach 0 my Pawn come to T-Pose the Mover Attached to him just stay in the local, a Gun (from the UDK robot) fall and then the udk play a death animation in First Person (The one that the camera go down looking to one side to another).

        My DeathAnim is in PHYS_RigidBody > DeathAnimSlot > DeathI

        MyCustomPawn (UDNPawn)

        Code:
        class UDNPawn extends UTPawn DependsOn(SeqVar_IdlePose);
        
        var float CamOffsetDistance; //Position on Y-axis to lock camera to
        var float 	NextBlendTime;
        var AnimNodeSlot DeathAnimSlot;
        //override to make player mesh visible by default
        simulated event BecomeViewTarget( PlayerController PC )
        {
           local UTPlayerController UTPC;
        
           Super.BecomeViewTarget(PC);
        
           if (LocalPlayer(PC.Player) != None)
           {
              UTPC = UTPlayerController(PC);
              if (UTPC != None)
              {
                 //set player controller to behind view and make mesh visible
                 UTPC.SetBehindView(true);
                 SetMeshVisibility(UTPC.bBehindView);
                 UTPC.bNoCrosshair = true;
              }
           }
        }
        
        simulated function bool CalcCamera( float fDeltaTime, out vector out_CamLoc, out rotator out_CamRot, out float out_FOV )
        {
           out_CamLoc = Location;
           out_CamLoc.Y = 1100;
           out_CamLoc.Z = 380;
        
           //out_CamLoc.x = 100;	
           out_CamRot.Pitch = 0;
           out_CamRot.Yaw = 49084;
           out_CamRot.Roll = 0;
           JumpZ = 500;
           return true;
        
        
        }
        
        simulated singular event Rotator GetBaseAimRotation()
        {
           local rotator   POVRot;
        
           POVRot = Rotation;
           if( (Rotation.Yaw % 65535 > 16384 && Rotation.Yaw % 65535 < 49560) ||
              (Rotation.Yaw % 65535 < -16384 && Rotation.Yaw % 65535 > -49560) )
           {
              POVRot.Yaw = 32768;
           }
           else
           {
              POVRot.Yaw = 0;
           }
           
           if( POVRot.Pitch == 0 )
           {
              POVRot.Pitch = RemoteViewPitch << 8;
           }
        
           return POVRot;
        }   
        
        // The array of items that we will refer as the inventory //
        function ChangeIdlePose(SeqAct_ChangeIdlePose MyAction)
        {
        	Idles = MyAction.PoseID;
        }
        
        
        simulated function PlayDying(class<DamageType> DamageType, vector HitLoc)
        {
        	SetCollisionType(COLLIDE_NoCollision);
        	DeathAnimSlot.SetActorAnimEndNotification(true);
        	DeathAnimSlot.PlayCustomAnim('DeathI', 1.0, 0.05, -1.0, false, false);
        	LifeSpan=1.0;
        }
        
        
        defaultproperties
        {
           CamOffsetDistance=30.0
           MaxFootstepDistSq=5000000.0
        }

        Comment


        • #5
          LOL

          I think I wrote so wrong that no one understand the problem, sorry...

          So here we go again:

          - My game is 2,5D
          - My custom char extends from UTPawn
          - I want him to have just one type of Death ANimation
          - Using the code that paco sends, udk stops crash... but now he play some 1st Person Animation from the UDK Robot... not MY animation...

          So I want to know if I have to do something else to this works.


          Comment

          Working...
          X