Replacing a player with a bot

Support for MFPS 2.0
Post Reply
User avatar
Leonid_RU
Contributor
Contributor
Posts: 45
Joined: Tue Sep 11, 2018 3:04 am

Tue Jul 21, 2020 9:35 am

Hello!

The game provides the ability to add bots instead of players if necessary, and also if the player enters the room, the bot disappears. But if the player leaves the room, the bot does not appear again. Tell me how to make the bot appear when the player leaves the room.
I use MFPS version 1.7
User avatar
Lovatto
Admin
Admin
Posts: 1493
Joined: Sun Dec 07, 2014 3:18 pm
Contact:

Wed Jul 22, 2020 10:17 am

When a bot is replaced by a player all the data of replaced bot is deleted,
so in order to respawn a replaced bot in mid game, you will have to create the bot data again, add it to the respective slot and team and then spawn it as usual,
all the code referring to this is found in bl_AIMananger.cs: FirstSpawn(), SpawnBot(...), CheckPlayerSlot(...)
Post Reply