I'm trying to create a damage to stamina through script. At the moment I'm using DamageAV("stamina", variable) inside an OnUpdate() event. This works, but when stamina reaches zero, I don't get the same effect like when your stamina reaches zero by sprinting, that is, that the bar flashes and that it takes a bit to start recovering. Is there a special command to achieve this?
My other question is about the encumbrance effect. I want that when stamina reaches zero, that you get the same effect as when you are encumbered, so that you can't even run until you recover some stamina. I've been looking everywhere and couldn't find any hint on how to do this. Is this effect hardcoded? I only found the text that is displayed when the effect fires. If someone knows how to achieve the same through script, that would help me a lot. At the moment I circumvented this by adding an invisible very heavy object to the player when his stamina reaches zero and deleting the overencumbered text. This works, but is dirty and buggy...
