skin change code problem

  • Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

Dtach

°we are the robots
Mar 22, 2004
10
0
0
38
netherlands
www.thunderclash.tk
Hi this is a little mutator that makes everyone a skelliton and suppose to set skins for red and blue teams but its not working
so if anyone know a way to fix it or a other way of making it work
thanks in advance
--
Code:
// Undead Brawl
class MutUndead extends Mutator;
#exec OBJ LOAD FILE="..\textures\PlayerSkins.utx"
#exec OBJ LOAD FILE="..\textures\wm_textures.utx"

event PreBeginPlay()
{
    SetTimer(0.5,true);
}

simulated function Timer()
{
    local Controller C;
    local xPawn x;

    for (C = Level.ControllerList; C != None; C = C.NextController)
    {
	  if (C.Pawn != None)
        {
        x = xPawn(C.Pawn);
		if(x != none && !x.bSkeletized)
				{
		x.LinkMesh(mesh(DynamicLoadObject("HumanMaleA.SkeletonMale",class'Mesh')), true);
 		x.bSkeletized = true;
}
    if(C != none && C.PlayerReplicationInfo != none)
	 switch(x.PlayerReplicationInfo.TeamID)
	{
case 0:
		x.Skins[0]=ColorModifier'wm_textures.wm_ColorBars_Red';
	break;
case 1:
		x.Skins[0]=ColorModifier'wm_textures.wm_ColorBars_Blue';
	break;
default:
	Log("Unknown team, using default skin");
		x.Skins[0]=Texture'PlayerSkins.Human_Skeleton';}
	}
}
}

defaultproperties
{
     bOnlyDirtyReplication=False
     RemoteRole=ROLE_SimulatedProxy
     GroupName="Undead"
     FriendlyName="Undead Brawl"
     Description="Play as skeletons.|meheheheheheehheehhehe O_o"
     bAlwaysRelevant=True
     bSkipActorPropertyReplication=False
}