How do I receive the damage I did to another player?

Support for MFPS 2.0 (for verified users)
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.
Post Reply
User avatar
Avocado Shark
Contributor
Contributor
Posts: 13
Joined: Thu Jan 21, 2021 12:42 am

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.
User avatar
Lovatto
Admin
Admin
Posts: 1834
Joined: Sun Dec 07, 2014 3:18 pm
Contact:

Hi,

To receive assistance, please provide me your purchase invoice number in a PM.

Regards.
How to find your Invoice Number: Here
How to find your Order Number: Here
User avatar
Avocado Shark
Contributor
Contributor
Posts: 13
Joined: Thu Jan 21, 2021 12:42 am

I sent you my invoice via your website
User avatar
Lovatto
Admin
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
     }
How to find your Invoice Number: Here
How to find your Order Number: Here
User avatar
Avocado Shark
Contributor
Contributor
Posts: 13
Joined: Thu Jan 21, 2021 12:42 am

Thanks alot
User avatar
Avocado Shark
Contributor
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?
Post Reply