Hi does anyone know how I would integrate https://assetstore.unity.com/packages/tools/particles-effects/blood-damage-effect-9400 I did it for the old UFPS but I'm not sure how with this controller? The way I did it for UFPS is
[SerializeField]
private float damageBloodAmount = 10;
[SerializeField]
private float maxBloodIndication = 0.5f;
at the top of FPPlayerDamageHandler script, serializeField is for it to show up in the inspector. Then in the protected virtual void Update() put in
BleedBehavior.minBloodAmount = maxBloodIndication * (MaxHealth - CurrentHealth) / MaxHealth; at the bottom of the function then in the public override void Damage(vp_DamageInfo damageInfo) and NOT the public override void Damage(float damage) Put BleedBehavior.BloodAmount += Mathf.Clamp01(damageBloodAmount * CurrentHealth / MaxHealth); at the top of the function then put BleedBehavior.minBloodAmount = maxBloodIndication * (MaxHealth - CurrentHealth) / MaxHealth; at the very bottom of the function just before the last }
Put the BleedBehaviour on your weaponcamera. The script is actually BloodOverlay when you click on AddComponent to by the way. When you get hurt it will come up with the damage effect and will also fade out. If you dont want the damage arrows disable the vp_Pain HUD or put no image in the Pain Texture if you want the arrows. Hopefully this helps anyone else and you don't have as much trouble as i had. On the FPPlayerDamageHandler i actually changed the values on damageBloodAmount and maxBloodIndication to 3 and 0.
[SerializeField]
private float damageBloodAmount = 10;
[SerializeField]
private float maxBloodIndication = 0.5f;
at the top of FPPlayerDamageHandler script, serializeField is for it to show up in the inspector. Then in the protected virtual void Update() put in
BleedBehavior.minBloodAmount = maxBloodIndication * (MaxHealth - CurrentHealth) / MaxHealth; at the bottom of the function then in the public override void Damage(vp_DamageInfo damageInfo) and NOT the public override void Damage(float damage) Put BleedBehavior.BloodAmount += Mathf.Clamp01(damageBloodAmount * CurrentHealth / MaxHealth); at the top of the function then put BleedBehavior.minBloodAmount = maxBloodIndication * (MaxHealth - CurrentHealth) / MaxHealth; at the very bottom of the function just before the last }
Put the BleedBehaviour on your weaponcamera. The script is actually BloodOverlay when you click on AddComponent to by the way. When you get hurt it will come up with the damage effect and will also fade out. If you dont want the damage arrows disable the vp_Pain HUD or put no image in the Pain Texture if you want the arrows. Hopefully this helps anyone else and you don't have as much trouble as i had. On the FPPlayerDamageHandler i actually changed the values on damageBloodAmount and maxBloodIndication to 3 and 0.