Results 1 to 5 of 5

Hybrid View

  1. #1
    MSgt. Shooter Person
    Join Date
    Mar 2011
    Posts
    211

    Default Programming: Ragdoll for MobileGameCrowdAgent upon death. 70$

    I'm trying to get a Mobile Crowd Agent to have a ragdoll effect when they die.

    Job pays 70$ via paypal. I'm using UDK Feb 2011. Please feel free to message me if you need anymore information.



    In the Classes > MobileGameCrowdAgent.uc I have the following code:

    Code:
    /** Stop agent moving and pay death anim */
    function PlayDeath(vector KillMomentum)
    {
    	Super.PlayDeath(KillMomentum);
    
    	if ( WorldInfo.TimeSeconds - LastRenderTime > 1 )
    	{
    		LifeSpan = 0.01;
    	}
    	else
    	{
    		SkeletalMeshComponent.SetHasPhysicsAssetInstance(true);
            // If we had stopped updating kinematic bodies on this character due to distance from camera, force an update of bones now.
            SkeletalMeshComponent.MinDistFactorForKinematicUpdate = 0.f;
            SkeletalMeshComponent.ForceSkelUpdate();
            SkeletalMeshComponent.UpdateRBBonesFromSpaceBases(TRUE, TRUE);
    
            CollisionComponent = SkeletalMeshComponent;
            SetTickGroup(TG_PostAsyncWork);
            SkeletalMeshComponent.SetTickGroup(TG_PostAsyncWork);
            SkeletalMeshComponent.PhysicsWeight = 1.0;
            SetPhysics(PHYS_RigidBody);
            SkeletalMeshComponent.SetBlockRigidBody(true);
            SkeletalMeshComponent.PhysicsAssetInstance.SetAllBodiesFixed(FALSE);
            SkeletalMeshComponent.SetRBChannel(RBCC_Pawn);
            SkeletalMeshComponent.SetRBCollidesWithChannel(RBCC_Default,TRUE);
            SkeletalMeshComponent.SetRBCollidesWithChannel(RBCC_Pawn,TRUE);
            SkeletalMeshComponent.SetRBCollidesWithChannel(RBCC_Vehicle,TRUE);
            SkeletalMeshComponent.SetRBCollidesWithChannel(RBCC_Untitled3,FALSE);
            SkeletalMeshComponent.SetRBCollidesWithChannel(RBCC_BlockingVolume,TRUE);
            SkeletalMeshComponent.SetTraceBlocking(false,true); 
    
            if( KillMomentum != vect(0,0,0) )
            {
                SkeletalMeshComponent.AddImpulse(0.5*KillMomentum, Location, '', false);
            }
            LifeSpan = DeadBodyDuration; 
    	}
    
    }

  2. #2
    Iron Guard
    Join Date
    Dec 2009
    Location
    Kirkcaldy, Scotland
    Posts
    832

    Default

    Did you manage to get this sorted yet ?
    Quote Originally Posted by 30morgh View Post
    I want to play Once Upon a Time in the time path Returns How do I do that?

  3. #3
    MSgt. Shooter Person
    Join Date
    Mar 2011
    Posts
    211

    Default

    Yes and no. Upon death crowds will rag-doll and kind of blow back from the last projectile that killed them. But, once dead will no longer collide with projectiles.

  4. #4
    Iron Guard
    Join Date
    Mar 2011
    Location
    U.S.
    Posts
    836
    Gamer IDs

    Gamertag: ICHAINSAWDURMOM

    Default

    Make sure that you set the collide channels to collide with said projectiles after the ragdoll process.

  5. #5
    MSgt. Shooter Person
    Join Date
    Mar 2011
    Posts
    211

    Default

    You mean like this?

    SkeletalMeshComponent.SetRBCollidesWithChannel(RBC C_Projectile,TRUE);

    I'm sure of the correct syntact there


 

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Copyright ©2009-2011 Epic Games, Inc. All Rights Reserved.
Digital Point modules: Sphinx-based search vBulletin skin by CompletevB.com.