hey,
i searchd the forum first, but didnt get my mistake.
i get the error in my script. i have a script called applyCharCustom.js wich handles the look of the players avatar since i got multiple characters and skins and weapons available.
in start function i send all the players the visual style of the new player. everytime a new player joins everyone know how he should look. works like a charm.
function Start(){
tno=GetComponent(TNObject);
if(tno.isMine)
{
race=PlayerPrefs.GetInt("race");
skin=PlayerPrefs.GetInt("skin");
weaponHolder=PlayerPrefs.GetInt("weaponHolder");
tno.Send("raceSwitch",Target.All,race);
tno.Send("weaponSwitch",Target.All,weaponHolder);
tno.Send("skinSwitch",Target.All,skin);
//raceSwitch();
//weaponSwitch();
//skinSwitch();
}
}
problem is the code below. new players doesnt know how earlyr connected players look like, so my idea was to just use the OnNetworkPlayerJoin function to tell the new player how the others should look like. on this call i get the error. it works and the visual style is set correct, but after the error, the new player doesnt see animations on the others at all. :/
function OnNetworkPlayerJoin(p:Player){
tno.Send("raceSwitch",p,race);
tno.Send("weaponSwitch",p,weaponHolder);
tno.Send("skinSwitch",p,skin);
}
any idea?