News UnrealEd Files Mods FragBU Liandri Archives
BeyondUnreal Forums

Go Back   BeyondUnreal Forums > Unreal Development > Coding

Reply
 
Thread Tools Display Modes
Old 22nd Apr 2004, 01:02 PM   #1
Dtach
we are the robots
 
Join Date: Mar. 22nd, 2004
Location: netherlands
Posts: 10
skin change code problem

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
}
__________________
Team [stunt] | Thunderclash
Dtach is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 04:50 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.

Copyright ©1998 - 2012, BeyondUnreal, Inc.
Privacy Policy | Terms of Use
Bandwidth provided by AtomicGamer