Good afternoon!
Tell me how you can remove weapons from the hands of the player (not the bot) after his death. I tried to do it in various ways, but the weapon was still in my hands. The bots managed to remove the weapon without any problems.
Removing weapons in the hands of death
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:
You mean to throw the weapon after the player dies so the weapon is able to pick up by other players, right?
if's so, this is already implemented, if this is not how works for you, please provide me some details to replicate the scenario.
if's so, this is already implemented, if this is not how works for you, please provide me some details to replicate the scenario.
- Lovatto
- Admin
- Posts: 1834
- Joined: Sun Dec 07, 2014 3:18 pm
- Contact:
In this case, the code that you should look at is located in bl_PlayerHealthManager.cs -> Die(...) ->
replace that call with a simple:
Code: Select all
if (bl_GameData.Instance.DropGunOnDeath)
{
GunManager.ThrwoCurrent(true, PlayerSync.NetGunsRoot.position + transform.forward);
}
Code: Select all
PlayerSync.NetGunsRoot.gameObject.SetActive(false);