1. I've been investigating the Event Manager plugin as it doesn't reflect true weapon damage during events (as well as bleeding and relative HP screen effects) and I've navigated around bleeding and screen effects, but i can't seem to see how Event Manager goes about scaling weapon damage?

    From my understanding it may be something to do with bullets sent and received not accounting for Armour? I tried the line "info.useprotection = true;" after looking at the properties of the HitInfo class, but it didn't seem to change anything.

    I also have a suspicion it might have to do with DamgeTypes.Total() not factoring armor and only the type of damage?

    Would anyone be able to point me in the right direction to resale the HP values to vanilla?
     
  2. HitInfo.ScaleAll(float)
     
    Last edited by a moderator: Dec 3, 2017
  3. Would you be able to give me an example of how to implement it? I've tried
    Code:
                        float damageAmount = info.damageTypes.Total();
                                          if (attacker != null)
                        {
                            if (!GetUser(attacker))
                            {
                                NullifyDamage(info);
                                return;
                            }
                        }                  
                        if (player.health - damageAmount < 1)
                        {
                            info.damageTypes.ScaleAll(0.5f);
                            NullifyDamage(info);
                            OnPlayerDeath(player, info);
                            return;
                        }
    And

    Code:
            void NullifyDamage(HitInfo info)
            {
                info.UseProtection = true;
                info.damageTypes = new DamageTypeList();
                info.damageTypes.ScaleAll(0.5f);
                info.HitEntity = null;
                info.PointStart = Vector3.zero;
            }
     
  4. info.ScaleAll(0);
     
  5. Hasn't changed anything.
     
  6. Works for me
     
  7. Care to share an example?