Damage popusp
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.
- Avocado Shark
- Contributor
- Posts: 13
- Joined: Thu Jan 21, 2021 12:42 am
I have a question related to this topic which is how do I get who I hit. Like when I damage someone how do I get his gameobject?
- Lovatto
- Admin
- Posts: 1834
- Joined: Sun Dec 07, 2014 3:18 pm
- Contact:
Hi,
For the MFPS players:
bl_PlayerHealthManager.cs -> SyncDamage(...) -> check that the one that gives the damage is the local player, if it's so then the hitted player is that gameObject:
For the MFPS players:
bl_PlayerHealthManager.cs -> SyncDamage(...) -> check that the one that gives the damage is the local player, if it's so then the hitted player is that gameObject:
Code: Select all
if (m_sender != null && m_sender.NickName == LocalName && cause != DamageCause.Bot)
{
ThePlayerHitted = gameObject;
}
- Avocado Shark
- Contributor
- Posts: 13
- Joined: Thu Jan 21, 2021 12:42 am
Yeah I understand that, but how do I get the player hitted? I know its probably something dumb and I am sorry for asking.