Page MenuHomeFeedback Tracker

Unflip\Set up actions appear incorrectly at certain damage states
Feedback, NormalPublic

Description

PressXToFlipTheThing action to unflip karts, ED-1D Pelter and (probably) some static weapons has incorrect condition, they use canMove to determine if vehicle is upside down while this condition also checks for damaged hit points. So you end up with action to unflip kart when it has its wheels damaged and action to unflip ED-1D when it has track broken.

Here are configs for all 3 actions.

Kart:

			class PressXToFlipTheThing
			{
				displayNameDefault = "Set up the Kart";
				displayName = "Set up the Kart";
				position = "";
				radius = 2.7;
				onlyForPlayer = 1;
				condition = "alive this AND not canmove this AND count crew this == 0";
				statement = "this setpos [getpos this select 0,getpos this select 1,(getpos this select 2)+2]";
			};

Statics:

			class PressXToFlipTheThing
			{
				displayNameDefault = "Set-up the tripod";
				displayName = "Set-up the tripod";
				position = "";
				radius = 2.7;
				onlyForPlayer = 1;
				condition = "alive this AND (not canmove this) AND (count crew this == 0 || isAutonomous this) AND (simulationEnabled this) AND ((locked this) < 2)";
				statement = "[this] call bis_fnc_unflipVehicle";
			};

ED-1D:

			class PressXToFlipTheThing
			{
				displayNameDefault = "Unflip UGV";
				displayName = "Unflip UGV";
				position = "";
				radius = 2.7;
				onlyForPlayer = 1;
				condition = "alive this AND {not canmove this} AND {(player distance this < 2)}";
				statement = "this setposASL ((getposASLVisual this) vectorAdd [0,0,0.5]);this setVectorDirAndUp [vectorDir this,[0,0,1]]";
			};

ED-1D Pelter's Unflip action has following condition:

alive this AND {not canmove this} AND {(player distance this < 2)}

canMove is inappropriate here because it also includes parts damage in the check and you end up with action visible if drone has one track damaged:

Solution would be:

  1. Introduce a new scripting command to only return internal upside down check (BOOL = isUpsideDown ENTITY) and use it instead of canMove
  2. Replace canmove check with vectorDir _this select 2 < 0 in the config's condition

Also use [this] call bis_fnc_unflipVehicle for all statements instead of just static weapons, this function works decently with all vehicles.

Details

Severity
Trivial
Resolution
Open
Reproducibility
Always
Operating System
Windows 10 x64
Category
Config

Event Timeline

SaMatra created this task.Apr 8 2023, 8:16 AM

funny though we have canFire method that checks if vehicle is not dead and not upsidedown but it is not available in its pure form. A dedicated command should be helpful

bis_fnc_unflipVehicle has an undefined variable
p:\a3\functions_f\Vehicles\fn_unflipVehicle.sqf
Author: reyhard Description: Safely unflips selected vehicle

At the bottom of the script:
_vehicle setPosWorld _adjusted;

But _adjusted is undefined... I guess it should be _newpos instead...?

Additionally, the description "Safely unflips selected vehicle" is not so accurate, as the fnc will kill any unit close to the vehicle being unfliped

Since A3 really needs a working/functional vehicle unflip script for many instances, I suggest fixing and improving upon this and the other fncs used by the actions to unflip karts, ED-1D Pelter and some static weapons descrived in detail by @SaMatra

151259 getEntityInfo

Also use [this] call bis_fnc_unflipVehicle for all statements instead of just static weapons, this function works decently with all vehicles.

Nope, it doesnt work if vehicle is not local, but direct statements from actions also dont handle locality

BIS_fnc_KK set Ref Ticket to AIII-56180.Jan 10 2024, 6:52 PM
BIS_fnc_KK removed BIS_fnc_KK as the assignee of this task.Feb 8 2024, 2:18 PM
BIS_fnc_KK changed the task status from New to Feedback.
BIS_fnc_KK added a subscriber: BIS_fnc_KK.

should be fixed