IsRunning
A function included in the TES CS v1.0.
Syntax:
(IsRunning:bool) reference.IsRunning
Returns 1 if the actor is currently running.
If called on the player, this function returns 0 or 1 based on the state of the 'run' and the 'always run' keys (not auto-run, which is the Q key), regardless of whether the player is actually moving. Use IsMovingForward, IsMovingBackward, IsMovingLeft and IsMovingRight to determine if the player is actually moving.
Returns vs. key combinations:
- Returns 0 if 'always run' is not toggled and 'Run' is not pressed
- Returns 1 if 'always run' is not toggled and 'Run' is pressed
- Returns 1 if 'always run' is toggled and 'Run is not pressed
- Returns 0 if 'always run' is toggled and 'Run is pressed
Note
There is an obscure bug when an NPC is disabled and enabled in the same frame. This is sometimes done by companion mods. The frame after this happens The NPC will be "frozen" and using IsRunning on the NPC will CTD. Workaround: place your IsRunning check under OBSE ismoving checks(forward, backward, left and right).
See Also