I have that part all working perfectly fine, at least so I think. I've not noticed any real issues with it, though I suppose it would help to actually look into someway to verify my numbers in-game instead of making rough judgements from stamina and damage taken. Anyways, that's not the point.
The issue is, I'm syncing it up with an Image Space effect on the hud that flashes when a player is hit while in this "exhausted" state.
The effect shows up fine when the player is below 40% stamina, but I can't get it to recognize "lower" stamina percentage levels.
Here's the code snippet:
Event OnHit(ObjectReference akAggressor, Form akSource, Projectile akProjectile, bool abPowerAttack, bool abSneakAttack, bool abBashAttack, bool abHitBlocked)if HeavyArmorCuirassEquipped == true && abHitBlocked == false Game.GetPlayer().DamageActorValue("stamina", 5) StaminaDamageValue = http://forums.bethsoft.com/topic/1363712-getactorvaluepercentage-not-working-properly-in-papyrus-logic-issue/5 if Game.GetPlayer().HasPerk(CPO_HA_PERK_TargetedDefense01) Game.GetPlayer().DamageActorValue("stamina", 1) StaminaDamageValue = http://forums.bethsoft.com/topic/1363712-getactorvaluepercentage-not-working-properly-in-papyrus-logic-issue/6 if Game.GetPlayer().HasPerk(CPO_HA_PERK_TargetedDefense02) Game.GetPlayer().DamageActorValue("stamina", 1) StaminaDamageValue = http://forums.bethsoft.com/topic/1363712-getactorvaluepercentage-not-working-properly-in-papyrus-logic-issue/7 if Game.GetPlayer().HasPerk(CPO_HA_PERK_TargetedDefense03) Game.GetPlayer().DamageActorValue("stamina", 1) StaminaDamageValue = http://forums.bethsoft.com/topic/1363712-getactorvaluepercentage-not-working-properly-in-papyrus-logic-issue/8 endif endif endif if Game.GetPlayer().GetActorValuePercentage("stamina") < 0.1 && Game.GetPlayer().HasPerk(CPO_HA_PERK_WeightedSpirit03) defaultDesaturateIMod.Apply(0.4) elseif Game.GetPlayer().GetActorValuePercentage("stamina") < 0.2 && Game.GetPlayer().HasPerk(CPO_HA_PERK_WeightedSpirit02) defaultDesaturateIMod.Apply(0.4) elseif Game.GetPlayer().GetActorValuePercentage("stamina") < 0.3 && Game.GetPlayer().HasPerk(CPO_HA_PERK_WeightedSpirit01) defaultDesaturateIMod.Apply(0.4) elseif Game.GetPlayer().GetActorValuePercentage("stamina") < 0.4 defaultDesaturateIMod.Apply(0.4) endifendifEndEventThe only thing that ever "fires" is the very bottom desaturatemod effect. The top 3 ones never trigger, or rather, I always get the effect to happen below 40% instead of only below 10, 20, etc. I thought the elseif's never fired, unless the above condition was false, AND it's condition was true? Why is my effect triggering at 40% then, reguardless of the perk and stamina conditons above it being true?


