Could be asleep, typing random messages instead.

Replacing Player Skins with a mutator

For questions and discussion about UnrealEd, UnrealScript, and other aspects of Unreal Engine design.

Moderators: ividyon, Semfry, zYnthetic

User avatar Lightning Hunter
Skaarj Elder Skaarj Elder
Posts: 1280
Joined: 11 Nov 2007, 22:12
Location: Pervert.

Subject: Replacing Player Skins with a mutator

Post Posted: 24 Jun 2019, 19:59

Edit: I have actually found a solution. I just needed to add 'PlayerPawn' to the classes in the code below, and I had to replace MultiSkins[0] instead of the skin itself (in case anyone finds this post and needs to perform this task themselves).

Can any coders out there help me with mutator code that works with replacing player skins? Ahaigh and I have already created replacement HD skins for all of the Unreal player skins, but the existing mutator I have does not work. It only works with the player carcasses. Here is an example of the current mutator code:

Code: Select all

/=============================================================================
// HDSkinNotify.
//=============================================================================
class HDSkinsNotify expands SpawnNotify;

var Actor PendingActors[64];
var int   PendingActorsCount;

//============================================================
simulated function PostBeginPlay()
{
   local Actor A;

   foreach AllActors( Class'Actor', A )
      ModifyThing(A);

   Super.PostBeginPlay();
}


//============================================================
event Actor SpawnNotification( actor A )
{
   ModifyThing(A);

   return A;
}

function Tick(float deltaTime)
{
    local int i;
    local actor A;
   
    for(i=0;i<PendingActorsCount;i++)
    {
        A = PendingActors[i];
        DelayedModifyThing(A);
    }
   
    PendingActorsCount = 0;
}

//============================================================
function ModifyThing( Actor A )
{
     if(A.Mesh != None)
     {
          if( A.Mesh == LodMesh'UnrealShare.Skaarjw' )
      {
         if( A.Skin == None )
            A.Skin = Texture'HDSkins2.HDSkaarjw1';
         else if( A.Skin == Texture'SkaarjL' )
            A.Skin = Texture'HDSkins2.HDSkaarjL';
         else if( A.Skin == Texture'Skaarjw2' )
            A.Skin = Texture'HDSkins2.HDSkaarjw2';
         else if( A.Skin == Texture'Skaarjw3' )
            A.Skin = Texture'HDSkins2.HDSkaarjw3';
         else if( A.Skin == Texture'Skaarjw4' )
            A.Skin = Texture'HDSkins2.HDSkaarjw4';
         else if( A.Skin == Texture'Skaarjw5' )
            A.Skin = Texture'HDSkins2.HDSkaarjw5';
      }
   }
}
if(A.IsA('CreatureChunks') || A.IsA('Fragment') || A.IsA('Chunk') || A.Class.Name == 'olCreatureChunks')
    {
       if(PendingActorsCount<64)
       {
          PendingActors[PendingActorsCount] = A;
          PendingActorsCount++;
       }
      else
      {
        log("Too much stuff - some won't be reskinned.");
      }
       return;
}
    DelayedModifyThing(A);
}

function DelayedModifyThing(actor A)
{
     if(A.Mesh != None)
     {
   //.......................................Gibs...........................................

      if( A.Mesh == LodMesh'UnrealI.BigChunk1' )
         {
         if( A.MultiSkins[1] == None )
            A.MultiSkins[1] = Texture'HDSkins2.HDJgcow1';
    }
  }
}


The code above is only an example of how the mutator replaces the Skaarj skin and a gib skin. They work differently, since the second part of the code has a delay in order to properly replace gibs. I have tried putting player skins in both parts of the mutator, and neither way will replace Player Skins. Any ideas?
For High-Res Unreal skins, click here.
For the RTNP "Ultimate Edition" HD, click here.

Image

Who is online

Users browsing this forum: No registered users and 0 guests

Copyright © 2001-2019 UnrealSP.org

Powered by phpBB® Forum Software © phpBB Limited