Page MenuHomeFeedback Tracker

[Tweak] Make `allowCrewInImmobile` not dismount AI from upside-down vehicles
Feedback, NormalPublic

Description

Currently the AI automatically disembark any upside down vehicle and there's no way to prevent it, even if the vehicle is perfectly healthy and is simply attached to another object.

Could you please make the code check for isAllowedCrewInImmobile before dismounting the crew?

Details

Severity
Tweak
Resolution
Open
Reproducibility
Always
Operating System
Windows 10 x64
Category
AI Issues

Event Timeline

Leopard20 created this task.Jun 1 2022, 3:30 PM
Leopard20 updated the task description. (Show Details)Jun 1 2022, 3:33 PM

They also disembark if the vehicle is in the air and is not upright (such as attaching a tank to a plane then doing rolls with the plane, tank crew will disembark)

This comment was removed by BIS_fnc_KK.
This comment was removed by BIS_fnc_KK.

Facing the issue . If the vehicle is not straight they also disembark.

BIS_fnc_KK removed BIS_fnc_KK as the assignee of this task.Jun 15 2022, 11:14 AM
BIS_fnc_KK changed the task status from New to Feedback.
BIS_fnc_KK added a subscriber: BIS_fnc_KK.

Is it mandatory to use the Alternative Syntax in 2.10?

I have a mod that sets

allowCrewInImmobile true;

which works pre 2.10, but no longer works after 2.10 update.

Changing it to the alt syntax format made it work again.

BIS_fnc_KK changed the task status from Feedback to Need More Info.Aug 25 2022, 10:48 AM

@Sam_Fisher Could you elaborate? The change should not have affected the legacy functionality

Sam_Fisher added a comment.EditedAug 25 2022, 11:15 AM

@BIS_fnc_KK

I'm using a very simple mod that's basically just

class Extended_InitPost_EventHandlers {
  class AllVehicles {
    class CrewInImmobile { init = "(_this select 0) allowCrewInImmobile true;"; };
  };
};

It worked fine in 2.08, but after I updated to 2.10 it stopped working (crew will exit vehicles when wheels/tracks are destroyed).

Then I changed it to the alt syntax

class Extended_InitPost_EventHandlers {
  class AllVehicles {
    class CrewInImmobile { init = "(_this select 0) allowCrewInImmobile [true, true];"; };
  };
};

And it started working again.
I'm not sure what's wrong lol.
Thanks!

Could you give me quick repro?

@BIS_fnc_KK do you mind if I upload the mod's config.cpp here?

veteran29 added a comment.EditedAug 26 2022, 5:53 PM

There seem to be two issues:

Issue 1

The old syntax does not seem to work despite isAllowedCrewInImmobile returning true:

_p = player getPos [20, getDir player];

_v = "B_LSV_01_armed_F" createVehicle _p;
createVehicleCrew _v;

_v spawn {
	sleep 1;
	
	_this allowCrewInImmobile true; // does not work
	//_this allowCrewInImmobile [true, false]; // works
	//_this allowCrewInImmobile [true, true]; // works
	
	
	sleep 0.1;
	systemChat str isAllowedCrewInImmobile _this;
	_this setHitPointDamage ["HitLFWheel", 1];
	_this setHitPointDamage ["HitLF2Wheel", 1]
};

Issue 2

Executing the allowCrewInImmobile too fast after vehicle creation:

_p = player getPos [20, getDir player];

_v = "B_LSV_01_armed_F" createVehicle _p;
createVehicleCrew _v;

// none of below works, executed too fast?
//_v spawn {_this allowCrewInImmobile true}; // does not work
//_v spawn {_this allowCrewInImmobile [true, false]}; // does not work
_v spawn {_this allowCrewInImmobile [true, true]}; // does not work

_v spawn {
	sleep 1;
	systemChat str isAllowedCrewInImmobile _this;
	_this setHitPointDamage ["HitLFWheel", 1];
	_this setHitPointDamage ["HitLF2Wheel", 1]
};

I'm running profiling branch.

This comment was removed by BIS_fnc_KK.

@veteran29 I must have looked at it dozen of times and couldn't see it. A typo! Issue1 is sorted, gonna investigate issue 2

Ok issue 2 cannot repro with spawn or without it works as expected

Sam_Fisher added a comment.EditedAug 26 2022, 7:41 PM

@veteran29 thank you, kind sir

About issue 2 though, I copied your code and executed, but it works as expected (in latest release version)

BIS_fnc_KK changed the task status from Need More Info to Confirmed Internally.Aug 26 2022, 7:41 PM

Unable to reproduce issue 2 anymore too... weird.

Should be fixed in rev.149832

BIS_fnc_KK changed the task status from Confirmed Internally to Feedback.Aug 28 2022, 11:31 AM
This comment was removed by LouMontana.