Things I've tried:
- If I manually set the PlayerPortrait to use the profileinfo from the map, it works just fine. (However I need to be able to use scripts to change the playerprofileinfo)
- If I set the Players skin to the profileinfo, it works--> It's not the PlayerProfileInfos getting randomized
- If I check how many possible profiles the portrait has (.GetProfileInfos.Length), it returns 1 (which is correct), and if I don't add the profileinfo it is 0 (which is also what it should be)
Code: Select all
public void OnStartup() {
IObjectPlayerPortrait portrait=(IObjectPlayerPortrait)Game.CreateObject("BgPlayerPortrait00");
portrait.SetProfileInfo(Game.GetObject<IObjectPlayerProfileInfo>("profile"));
}
Has anyone encountered anythin similar before? What could be causing it?