Hello everyone,
When master client disconnect from room all bots remove in room , i don't want bots deleted from room
how can I do it?
Thanks.
Bots Remove from room
Forum rules
To request support/assistance for MFPS, you first have to verify your purchase by sending your purchase invoice number to Lovatto in a PM.
To request support/assistance for MFPS, you first have to verify your purchase by sending your purchase invoice number to Lovatto in a PM.
- Lovatto
- Admin
- Posts: 1834
- Joined: Sun Dec 07, 2014 3:18 pm
- Contact:
on bl_Lobby.cs -> in the functions: CreateRoom() and OnNoRoomsToJoin() -> change this line:
with:
Code: Select all
CleanupCacheOnLeave = true,
Code: Select all
CleanupCacheOnLeave = false,
- Murilom84
- Member
- Posts: 12
- Joined: Thu Mar 12, 2020 7:24 am
Thank you for the feedback , but after making this change "CleanupCacheOnLeave = false" 3 errors are returned
1- bl_AIManager.cs Line 160 = if (agent.AITeam == Team.None) { Debug.LogError("This bot has not team"); }
2- bl_PlayerSync.cs Line 288 = RemotePlayerName = photonView.Owner.NickName;
3-bl_GameManager.cs Line 516 = if (OthersActorsInScene.ActorView != null && OthersActorsInScene.ActorView.Owner.ActorNumber == player.ActorNumber)
how can i fix them
1- bl_AIManager.cs Line 160 = if (agent.AITeam == Team.None) { Debug.LogError("This bot has not team"); }
2- bl_PlayerSync.cs Line 288 = RemotePlayerName = photonView.Owner.NickName;
3-bl_GameManager.cs Line 516 = if (OthersActorsInScene.ActorView != null && OthersActorsInScene.ActorView.Owner.ActorNumber == player.ActorNumber)
how can i fix them
- farizakbarov
- New Member
- Posts: 6
- Joined: Mon Nov 25, 2019 7:46 am
- farizakbarov
- New Member
- Posts: 6
- Joined: Mon Nov 25, 2019 7:46 am
- Murilom84
- Member
- Posts: 12
- Joined: Thu Mar 12, 2020 7:24 am
I did it with a little change. There is a slight delay but the game continues from where it left off.
Code: Select all
public void OnMasterClientSwitched(Player newMasterClient)
{
Debug.Log("The old masterclient left, we have a new masterclient: " + newMasterClient.NickName);
this.GetComponent<bl_ChatRoom>().AddLine("We have a new masterclient: " + newMasterClient.NickName);
if(PhotonNetwork.CurrentRoom.CustomProperties.ContainsKey("withbots"))
{
bl_AIMananger.Instance.BotSpawn();
}
}
- farizakbarov
- New Member
- Posts: 6
- Joined: Mon Nov 25, 2019 7:46 am
Thank you. I'll test it right away.Murilom84 wrote: ↑Fri Mar 13, 2020 6:49 am
I did it with a little change. There is a slight delay but the game continues from where it left off.
Code: Select all
public void OnMasterClientSwitched(Player newMasterClient) { Debug.Log("The old masterclient left, we have a new masterclient: " + newMasterClient.NickName); this.GetComponent<bl_ChatRoom>().AddLine("We have a new masterclient: " + newMasterClient.NickName); if(PhotonNetwork.CurrentRoom.CustomProperties.ContainsKey("withbots")) { bl_AIMananger.Instance.BotSpawn(); } }
- farizakbarov
- New Member
- Posts: 6
- Joined: Mon Nov 25, 2019 7:46 am
I've tried. Sorry, it didn't work correctly. the bots are spawning again. Other players understand this. Scores and names don't work properly.farizakbarov wrote: ↑Fri Mar 13, 2020 6:51 amThank you. I'll test it right away.Murilom84 wrote: ↑Fri Mar 13, 2020 6:49 am
I did it with a little change. There is a slight delay but the game continues from where it left off.
Code: Select all
public void OnMasterClientSwitched(Player newMasterClient) { Debug.Log("The old masterclient left, we have a new masterclient: " + newMasterClient.NickName); this.GetComponent<bl_ChatRoom>().AddLine("We have a new masterclient: " + newMasterClient.NickName); if(PhotonNetwork.CurrentRoom.CustomProperties.ContainsKey("withbots")) { bl_AIMananger.Instance.BotSpawn(); } }