How to Know if the Player is Standing up (not Proned or Crouched)?

Donnovan

Member
Hi,

I need to know if the player is standing up, so i make he stands, if he is not.

Code:
Private ["_isStanding"];
_isStanding = ???
if (!_isStanding) then {
    player playAction "playerStand";
}

_isStanding must be True, if player is standing, and False, if player is not standing.

Or just ignore my code, you know how to do this check?

Thankyou in advance.
 
Thankyou cyrq!

This open a wide variety of option to my new scripts and changed ones.

Once i figure the last bit out, you is checkling prone, i an checking stand, i will post the solution here.
 
This capture the player animation:
Code:
_state = (getText (configFile >> "CfgMovesMaleSdr" >> "States" >> animationState player >> "actions"));

This check if the player animation is proned, and if he is, make the player stand up:
Code:
if (_state in ["RifleProneActions","PistolProneActions","CivilProneActions"]) then {
    cutText [format["You is Proneel!"], "PLAIN DOWN"];
    player playAction "PlayerStand";
    sleep 1.8;
};

This check if the player animation is crouched (kneel), and if he is, make the player stand up:
Code:
if (_state in ["RifleKneelActions","PistolKneelActions","CivilKneelActions"]) then {
    cutText [format["You is Kneel!"], "PLAIN DOWN"];
    player playAction "PlayerStand";
    sleep 1; //wait for the animation to finish
};

All in a row:
Code:
_state = (getText (configFile >> "CfgMovesMaleSdr" >> "States" >> animationState player >> "actions"));

if (_state in ["RifleProneActions","PistolProneActions","CivilProneActions"]) then {
    cutText [format["You is Proneel!"], "PLAIN DOWN"];
    player playAction "PlayerStand";
    sleep 1.8;
};

if (_state in ["RifleKneelActions","PistolKneelActions","CivilKneelActions"]) then {
    cutText [format["You is Kneel!"], "PLAIN DOWN"];
    player playAction "PlayerStand";
    sleep 1;
};
 
Back
Top