1. How i get obtained damage to int ?
     
  2. Calytic

    Calytic Community Admin Community Mod

    Damage is calculated for each damage type. You can average all the damage types together or you can do something like the following

    Code:
    float damage = hitinfo.damageTypes.Get(hitinfo.damageTypes.GetMajorityDamageType());
     
  3. It does not work, there are other options?
     
  4. Code:
    var damages = info?.damageTypes?.Total() ?? 0f;
    
    Should work, though I think you may need to put it on a NextTick for it to get the proper damage amount, like this:
    Code:
      NextTick(() =>
        {
    var damages = info?.damageTypes?.Total() ?? 0f;
    });