Announcement

Collapse
No announcement yet.

Replication of SkeletalMesh [Oct 2012]

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

    Replication of SkeletalMesh [Oct 2012]

    Code:
    /**
     * Copyright 1998-2012 Epic Games, Inc. All Rights Reserved.
     */
    class UDKBlankPawn extends GamePawn
    	config(Game);
    
    
    //=============================================================================
    // Variables
    //=============================================================================
    var repnotify SkeletalMesh   ReplicatedMesh;
     
     
    //=============================================================================
    // Network replication
    //=============================================================================
    replication
    {
        if ( (!bSkipActorPropertyReplication || bNetInitial) && (Role==ROLE_Authority) )
            ReplicatedMesh;
    }
     
     
    //=============================================================================
    // Functions
    //=============================================================================
    simulated event ReplicatedEvent(name VarName)
    {
        if( VarName == 'ReplicatedMesh' )
        {
            `log(ReplicatedMesh);
    		
    		// CASE 1:
    		//Log: none
    		
    		// CASE 1:
    		//Log: SK_CH_LIAM_Cathode
        }
        else
        {
            Super.ReplicatedEvent(VarName);
    	}
    }
     
     
    reliable server function DoSkeletalMeshChange()
    {
        // CASE 1
        //ReplicatedMesh = SkeletalMesh'CH_IronGuard_Male.Mesh.SK_CH_IronGuard_MaleA';
    	
        // CASE 2
        ReplicatedMesh = SkeletalMesh'CH_LIAM_Cathode.Mesh.SK_CH_LIAM_Cathode';
    }
    The upper script is tested with October 2012!

    Replicating SkeletalMesh'CH_LIAM_Cathode.Mesh.SK_CH_LIAM_Catho de' to the client Works, but with SkeletalMesh'CH_IronGuard_Male.Mesh.SK_CH_IronGuar d_MaleA' replication result is NONE
Working...
X