Damage popusp

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

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?
User avatar
Lovatto
Admin
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:

Code: Select all

  if (m_sender != null && m_sender.NickName == LocalName && cause != DamageCause.Bot)
                    {
                        ThePlayerHitted = gameObject;
                    }
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

Yeah I understand that, but how do I get the player hitted? I know its probably something dumb and I am sorry for asking.
Post Reply