1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. 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.

Losing Skins?

Discussion in 'Programming' started by jb, Feb 21, 2002.

  1. jb

    jb New Member

    Joined:
    May 22, 2000
    Messages:
    278
    Likes Received:
    0
    Folks,

    sorry I have one more replication issue. In my gametype in an online game only when we kill a bot and its carcas spawns, it looses it skin :( Other wise the bot has its skin on even if its a team skin. Looking at the log I see this:

    Warning: Failed to load 'Texture SoldierSkins.3': Failed to find object 'Texture SoldierSkins.3'
    ScriptLog: Failed to load SoldierSkins.3 so load SoldierSkins.blkt3
    Warning: Failed to load 'Texture SoldierSkins.4': Failed to find object 'Texture SoldierSkins.4'
    ScriptLog: Failed to load SoldierSkins.4 so load SoldierSkins.blkt4
    Warning: Failed to load 'Texture SoldierSkins.3': Failed to find object 'Texture SoldierSkins.3'
    ScriptLog: Failed to load SoldierSkins.3 so load SoldierSkins.blkt3
    War


    So where can I start to check to see if forgot to replicated something?
     
  2. jb

    jb New Member

    Joined:
    May 22, 2000
    Messages:
    278
    Likes Received:
    0
    Hmm found some more clues. Looking into my log again I found this statement:

    ScriptLog: Getting None, None, None, None
    ScriptLog: Getting None, None, None, None
    ScriptLog: Getting None, None, None, None
    ScriptLog: Getting None, None, None, None
    ScriptLog: Getting None, None, None, None
    ScriptLog: Getting None, None, None, None
    ScriptLog: Getting None, None, None, None
    ScriptLog: Getting None, None, None, None
    ScriptLog: Getting None, None, None, None
    ScriptLog: Getting None, None, None, None
    ScriptLog: Getting None, None, None, None
    ScriptLog: Getting None, None, None, None
    ScriptLog: Getting None, None, None, None
    ScriptLog: Getting None, None, None, None
    ScriptLog: Getting None, None, None, None

    Tracing that back I find that it came from the TournamentPlayer.uc file:

    Code:
    function ClientReplicateSkins(texture Skin1, optional texture Skin2, optional texture Skin3, optional texture Skin4)
    {
    	local class<Actor> C;
    
    	// do nothing (just loading other player skins onto client)
    	log("Getting "$Skin1$", "$Skin2$", "$Skin3$", "$Skin4);
    	if ( Role != ROLE_Authority )
    		BossRef = class<Actor>(DynamicLoadObject("Botpack.TBoss",class'Class'));
    }
    so any ideas why this is not getting replicated??

    Thanks,
    Jb
     
  3. jb

    jb New Member

    Joined:
    May 22, 2000
    Messages:
    278
    Likes Received:
    0
    YAU = Yet Another Update

    Ok now getting better at tracking these things. I see in my bot spawn code I am calling the deatmatch version:

    Code:
    function Bot SpawnBot(out NavigationPoint StartSpot)
    {
         local Bot NewBot;
         local ChaosKOTHPRI pri;
    
         NewBot=Super(DeathMatchPlus).SpawnBot(StartSpot);
         pri = Spawn(class'ChaosKOTHPRI',,,StartSpot.Location,StartSpot.Rotation);
         if (pri != None) {
              pri.SetOwner(Newbot);
              pri.pri=NewBot.PlayerReplicationInfo;
              pri.OnHills=0;
              pri.TimeOnHill=0.0;
              pri.bIsATeamGame= false;
    //          Log("Successfully Spawned PRI for Bot: "@NewBot);
         }
         else {
              Log("Error spawning KOTH PRI for Bot: "@NewBot);
         }
         NewBot.SetOrders('Freelance', None, true);
         NewBot.OrderObject=None;
         return (NewBot);
    }
    
    So I thought my call to Super(DeathMatchPlus).SpawnBot(StartSpot) would handle this. Its seems to but did I do something wrong to the code that caused the replication to fail? I have noticed in deathmatchplus this code:

    Code:
    		if ( (Level.NetMode != NM_Standalone) && (bNetReady || bRequireReady) )
    		{
    			// replicate skins
    			for ( P=Level.PawnList; P!=None; P=P.NextPawn )
    				if ( P.bIsPlayer && (P.PlayerReplicationInfo != None) && P.PlayerReplicationInfo.bWaitingPlayer && P.IsA('PlayerPawn') )
    				{
    					if ( NewBot.bIsMultiSkinned )
    						PlayerPawn(P).ClientReplicateSkins(NewBot.MultiSkins[0], NewBot.MultiSkins[1], NewBot.MultiSkins[2], NewBot.MultiSkins[3]);
    					else
    						PlayerPawn(P).ClientReplicateSkins(NewBot.Skin);	
    				}						
    		}
    
    So I am not sure where I can check for errors now....
     
  4. jb

    jb New Member

    Joined:
    May 22, 2000
    Messages:
    278
    Likes Received:
    0
    Getting closer. I noticed this at the top area of my logs:

    Log: Spawning new actor for Viewport WindowsViewport0
    ScriptLog: Team 1
    ScriptLog: Login: Jb[COWA]
    Log: Possessed PlayerPawn: TFemale2 Entry.TFemale2
    Init: Initialized moving brush tracker for Level koth_alpha_pyramid.MyLevel
    DevAudio: Galaxy SetViewport: WindowsViewport0
    DevMusic: Unregister music: Music utmenu23.utmenu23
    Log: Possessed PlayerPawn: TFemale2 koth_alpha_pyramid.TFemale3
    DevMusic: Load music: Music Godown.Godown
    ScriptLog: Getting None, None, None, None
    ScriptWarning: TMale2Bot koth_alpha_pyramid.TMale2Bot0 (Function Engine.Pawn.:003F) Accessed None
    Warning: Failed to load 'Texture SoldierSkins.3': Failed to find object 'Texture SoldierSkins.3'
    ScriptLog: Failed to load SoldierSkins.3 so load SoldierSkins.blkt3
    Warning: Failed to load 'Texture SoldierSkins.4': Failed to find object 'Texture SoldierSkins.4'
    ScriptLog: Failed to load SoldierSkins.4 so load SoldierSkins.blkt4
    ScriptWarning: TMale2Bot koth_alpha_pyramid.TMale2Bot0 (Function Botpack.Bot.SetMultiSkin:02B3) Accessed None
    ScriptWarning: TMale2Bot koth_alpha_pyramid.TMale2Bot0 (Function Botpack.Bot.SetMultiSkin:02BB) Attempt to assigned variable through None
    ScriptLog: Getting None, None, None, None
    Warning: Failed to load 'Texture FCommandoSkins.1': Failed to find object 'Texture FCommandoSkins.1'
    ScriptLog: Failed to load FCommandoSkins.1 so load FCommandoSkins.cmdo1
    Warning: Failed to load 'Texture FCommandoSkins.4': Failed to find object 'Texture FCommandoSkins.4'
    ScriptLog: Failed to load FCommandoSkins.4 so load FCommandoSkins.cmdo4
    ScriptLog: Getting None, None, None, None
    ScriptWarning: TFemale2Bot koth_alpha_pyramid.TFemale2Bot0 (Function Engine.Pawn.PostNetBeginPlay:003F) Accessed None
    Warning: Failed to load 'Texture SGirlSkins.3': Failed to find object 'Texture SGirlSkins.3'
    ScriptLog: Failed to load SGirlSkins.3 so load SGirlSkins.army3
    Warning: Failed to load 'Texture SGirlSkins.4': Failed to find object 'Texture SGirlSkins.4'
    ScriptLog: Failed to load SGirlSkins.4 so load SGirlSkins.army4
    ScriptWarning: TFemale2Bot koth_alpha_pyramid.TFemale2Bot0 (Function Botpack.Bot.SetMultiSkin:02B3) Accessed None
    ScriptWarning: TFemale2Bot koth_alpha_pyramid.TFemale2Bot0 (Function Botpack.Bot.SetMultiSkin:02BB) Attempt to assigned variable through None




    Then looking at PostNetBeginPlay looks like that.

    Code:
    simulated event PostNetBeginPlay()
    {
         if ( Role != ROLE_SimulatedProxy )
              return;
         if ( bIsMultiSkinned )
         {
              if ( MultiSkins[1] == None )
              {
                   if ( bIsPlayer )
                        SetMultiSkin(self, "","", PlayerReplicationInfo.team);
                   else
                        SetMultiSkin(self, "","", 0);
              }
         }
         else if ( Skin == None )
              Skin = Default.Skin;
    
         if ( (PlayerReplicationInfo != None) 
              && (PlayerReplicationInfo.Owner == None) )
              PlayerReplicationInfo.SetOwner(self);
    }

    Should have have set the Role to simulated proxy some where?
     
  5. jb

    jb New Member

    Joined:
    May 22, 2000
    Messages:
    278
    Likes Received:
    0
    found it. Somehow I had corrupted my UT folder. I tried it on another PC and it worked fine. Not a single issue or log statement using my .U file. Doh!!!!
     
  6. Cieprus

    Cieprus Mapper...In Progress

    Joined:
    Feb 17, 2002
    Messages:
    113
    Likes Received:
    0
    :p AHAHAHAHHA....JB you solved your problem all by yourself...Hahaha this thread was all you... HaHaHa nice work tho!
     
  7. aspie

    aspie It's all good baby.

    Joined:
    Feb 24, 2001
    Messages:
    315
    Likes Received:
    0
    Tune into next weeks epsiode of Jb's Unreal Script adventure as he enters the fortress of Replication to destroy the evil king of replication, REPLICATOR.
     
  8. 2COOL4-U

    2COOL4-U New Member

    Joined:
    Mar 17, 2001
    Messages:
    505
    Likes Received:
    0
    looking forward to it :D
     
  9. jb

    jb New Member

    Joined:
    May 22, 2000
    Messages:
    278
    Likes Received:
    0
    soory folks just trying to make something work here. My old team mates have no time to help so I have no were else to turn to for help :(
     
  10. aspie

    aspie It's all good baby.

    Joined:
    Feb 24, 2001
    Messages:
    315
    Likes Received:
    0
    I wonder if i post a problem under the guise of Jb he'll answer it :)
     
  11. jb

    jb New Member

    Joined:
    May 22, 2000
    Messages:
    278
    Likes Received:
    0
    hey I have answered a few others...easy ones :)
     
  12. Call me Erdrik

    Call me Erdrik Arch Mage

    Joined:
    Nov 24, 1999
    Messages:
    334
    Likes Received:
    0
    hey hey! I don't mind just more info to soak up ;)

    tho I knew the problem as soon as I saw the 'failed to load's in the log. :p you just got here first :lol:
     
  13. jb

    jb New Member

    Joined:
    May 22, 2000
    Messages:
    278
    Likes Received:
    0
    Sure your just teasing me...you all knew I had a corrupt UT install..but just sat on it and let me plow away..never mind the countless hours of my torment :)
     

Share This Page