Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Common - Make fnc_isAwake also check isAwake command #10436

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Dystopian
Copy link
Contributor

@Dystopian Dystopian commented Oct 19, 2024

When merged this pull request will:

  • title.

isAwake command checks if alive unit is ragdolling. This state is like temporary unconscious. I know at least one method to cause it: push unit with moving vehicle quite intensely but don't kill him. The unit stops reacting to control, starts almost unconscious animation and comes round after some seconds.
Since recent Arma changes this state is not considered with lifeState command as it was before. So we need additional isAwake check.

Upd. quick testing step: player addForce [vectorDir player vectorMultiply 1000, player selectionPosition "SPINE", false];

@LinkIsGrim
Copy link
Contributor

Why do we want this?

@johnb432
Copy link
Contributor

This makes no sense to add: The purpose of FUNC(isAwake) is to check if the unit is conscious and alive, nothing else. Changing it could break a lot of things.

@Dystopian
Copy link
Contributor Author

2
This state can not be named awake.

I found quick testing step: player addForce [vectorDir player vectorMultiply 1000, player selectionPosition "SPINE", false];
This state is really unconscious but temporary instead of classic unconscious.

Why do we want this?

Because this state should break all the actions which check for FUNC(isAwake). You do can check dogtag of unit in this state (canCheckDogtag). You do can not wipe glasses in this state (canWipeGlasses). You do can not pass magazine to unit in this state (canPassMagazine).
You can not just think about this state as unit is OK.

The purpose of FUNC(isAwake) is to check if the unit is conscious and alive

This and isAwake is true. The name is self explaining.

Once again: in some previous Arma versions lifeState command returned neither HEALTHY nor INJURED in this state. I remember this for sure because I made Inventory action exactly for this state and dead.

Changing it could break a lot of things

Do you know what exactly this could really break?

@johnb432
Copy link
Contributor

This state can not be named awake.

Imo yes it can, as you are both conscious (and therefore alive). I disagree that the ragdoll state should become part of the definition - we'd need to update the "isNotUnconscious" interaction condition otherwise, which I oppose.

Do you know what exactly this could really break?

Since this function is API, it could break a number of unknown things. In practice I doubt it would, I'm just not comfortable adding something that I can't get behind.


The old syntax of addForce makes units go unconscious in both 2.16 and 2.18, meaning their lifeState is also changed.
I wanted to try getting run over by a vehicle in 2.16, but the legacy branch kept crashing on me, so I didn't test it, but from memory I doubt it would have put you as unconscious, as otherwise it would have bugged you out (in my tests I had to manually set setUnconscious false after running addForce, because it wouldn't render the unconscious screen and it wouldn't wake me up).
In 2.18 the person hit doesn't go unconscious and isn't registered as such, like the new syntax of addForce.

Imo the better solution is to either add individual checks where it's necessary or to add a canInteract condition for checking ragdoll state.

@PabstMirror
Copy link
Contributor

We only recently changed to the acefnc_isAwake - #10098
Many systems were designed around just checking _target getVariable ["ACE_isUnconscious", false]
and only running when user was explicitly in that medical state

the physx knockdown is a strange state, you really aren't unconscious
so I'm not sure if we should disable everything

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants