Well... I'm making a custom campaign, and I configured it to set player profiles just like the tutorial (keeping the user's gender and skin)
It works very well on all bots except for "Benny" (and eventually any other player who has zombie, mech or frankenbear skin)
I copied a piece of the tutorial script, and then wrote another part.
My idea was to make Benny keep his bear skin instead of getting dressed with my custom profile, but it doesn't works. It keep spawning with all these clothes overlapping his bear skin (looks very bad)
This is all I have in the script editor, I'm just learning c# so I'm probably doing it a strange, difficult or dumb way...
Hope you can help me
private IPlayer player1 = null; private IPlayer player2 = null; private IPlayer player3 = null; private IPlayer player4 = null; private IProfile profile1 = null; private IProfile profile2 = null; private IProfile profile3 = null; private IProfile profile4 = null; private IProfile BearProfile = null; public void OnStartup() { player1 = Game.GetPlayers()[0]; player2 = Game.GetPlayers()[1]; player3 = Game.GetPlayers()[2]; player4 = Game.GetPlayers()[3]; profile1 = (Game.GetSingleObjectByCustomID("Profile1") as IObjectPlayerProfileInfo).GetProfile(); profile2 = (Game.GetSingleObjectByCustomID("Profile2") as IObjectPlayerProfileInfo).GetProfile(); profile3 = (Game.GetSingleObjectByCustomID("Profile3") as IObjectPlayerProfileInfo).GetProfile(); profile4 = (Game.GetSingleObjectByCustomID("Profile4") as IObjectPlayerProfileInfo).GetProfile(); BearProfile = (Game.GetSingleObjectByCustomID("BearProfile") as IObjectPlayerProfileInfo).GetProfile(); if (player1.GetProfile().Skin != BearProfile.Skin) { IProfile newprofile1 = (Game.GetSingleObjectByCustomID("Profile1") as IObjectPlayerProfileInfo).GetProfile(); newprofile1.Gender = player1.GetProfile().Gender; newprofile1.Skin = player1.GetProfile().Skin; profile1 = newprofile1; player1.SetProfile(newprofile1); } else if (player1.GetProfile().Skin == BearProfile.Skin) { player1.SetProfile(BearProfile); } if (player2.GetProfile().Skin != BearProfile.Skin) { IProfile newprofile2 = (Game.GetSingleObjectByCustomID("Profile2") as IObjectPlayerProfileInfo).GetProfile(); newprofile2.Gender = player2.GetProfile().Gender; newprofile2.Skin = player2.GetProfile().Skin; profile2 = newprofile2; player2.SetProfile(newprofile2); } else if (player2.GetProfile().Skin == BearProfile.Skin) { player2.SetProfile(BearProfile); } if (player3.GetProfile().Skin != BearProfile.Skin) { IProfile newprofile3 = (Game.GetSingleObjectByCustomID("Profile3") as IObjectPlayerProfileInfo).GetProfile(); newprofile3.Gender = player3.GetProfile().Gender; newprofile3.Skin = player3.GetProfile().Skin; profile3 = newprofile3; player3.SetProfile(newprofile3); } else if (player3.GetProfile().Skin == BearProfile.Skin) { player3.SetProfile(BearProfile); } if (player4.GetProfile().Skin != BearProfile.Skin) { IProfile newprofile4 = (Game.GetSingleObjectByCustomID("Profile4") as IObjectPlayerProfileInfo).GetProfile(); newprofile4.Gender = player4.GetProfile().Gender; newprofile4.Skin = player4.GetProfile().Skin; profile4 = newprofile4; player4.SetProfile(newprofile4); } else if (player4.GetProfile().Skin == BearProfile.Skin) { player4.SetProfile(BearProfile); } }