So I am trying to develop damage popups, but I am struggling to find where the damage I did is displayed. So all I am asking is where do I find this int or float or do
I have to sync it myself.
How do I receive the damage I did to another player?
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:
- Avocado Shark
- Contributor
- Posts: 13
- Joined: Thu Jan 21, 2021 12:42 am
I sent you my invoice via your website
- Lovatto
- Admin
- Posts: 1834
- Joined: Sun Dec 07, 2014 3:18 pm
- Contact:
When the local player cause dame to another player, the gived damage can be catch in: bl_PlayerHealthManager.cs -> SyncDamage(...) -> the parameter "damage" indicate the gived damage, before shows the damage popup you first has to verified if the one that cause this damage was you (the local player), you can do it like this:
Code: Select all
if (m_sender != null && m_sender.NickName == LocalName && cause != DamageCause.Bot)
{
//show the damage popup
}
- Avocado Shark
- Contributor
- Posts: 13
- Joined: Thu Jan 21, 2021 12:42 am
Hi, I also have another 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?