Solved Hammer hit

Discussion in 'Rust Development' started by HOUGAN_Y, Oct 31, 2017.

  1. upload_2017-10-31_15-16-24.png

    SecondsSinceAttacked allways is Infinity. Where is trouble?
     
  2. It's Infinity, because entity haven't been attacked.
    Only after attack, entity will have this value.
    Code:
    public float _lastAttackedTime = float.NegativeInfinity;
     
  3. Understandable, but few month ago, i realized system on double hammer hit on entity, now it is not working.
    So, what changed, while entity isn't attacked after hammer hit?
     
  4. You can just refresh _lastAttackedTime every OnHammerHit if you need.
     
  5. Yeah, thank you. Forgot about it.