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:
- Introduce a new scripting command to only return internal upside down check (BOOL = isUpsideDown ENTITY) and use it instead of canMove
- 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.