Jump to content
Sign in to follow this  
cm

how to get the crew to board a vehicle after contact

Recommended Posts

Hey,

I have this mostly working except one problem.

I have the crew standing outside of the vehicle. I assign each one a certain role (e.g. gunner, commander etc). I place a 'SENTRY' waypoint on their position and a 'GET IN' waypoint on the vehicle. It works fine apart from one problem. No matter what combat mode or behaviour I set they ALWAYS engage the contacts first.

example:

Set combat mode to 'never fire':

+ crew is engaged upon

+ crew starts to engage the enemy, but just runs towards them and doesn't fire as they are set to 'Never fire'.

+ after standing around for a while they start running back to the vehicle

+ crew get shot up because they are stupid.

Is there a command I can use to ensure they do not engage at all and run straight to the vehicle. So far I've tries disableAI 'TARGET' and also 'AUTOTARGET'.

Thanks.

Share this post


Link to post
Share on other sites

Try setting the groups behavior to "CARELESS", that should probably work. Hello fellow Australasian by the way :)

Share this post


Link to post
Share on other sites

They still engage :(

Share this post


Link to post
Share on other sites

_unitname disableai "target"; _unitname disableai "autotarget"; sleep _sometime; _unitname enableai "target"; _unitname enableai "autotarget";

Share this post


Link to post
Share on other sites

i tried disableAI target and autotarget but I didn't try the sleep bit. What does that do?

Share this post


Link to post
Share on other sites
Hey,

I have this mostly working except one problem.

I have the crew standing outside of the vehicle. I assign each one a certain role (e.g. gunner, commander etc). I place a 'SENTRY' waypoint on their position and a 'GET IN' waypoint on the vehicle. It works fine apart from one problem. No matter what combat mode or behaviour I set they ALWAYS engage the contacts first.

example:

Set combat mode to 'never fire':

+ crew is engaged upon

+ crew starts to engage the enemy, but just runs towards them and doesn't fire as they are set to 'Never fire'.

+ after standing around for a while they start running back to the vehicle

+ crew get shot up because they are stupid.

Is there a command I can use to ensure they do not engage at all and run straight to the vehicle. So far I've tries disableAI 'TARGET' and also 'AUTOTARGET'.

Thanks.

Sentry - The group will move to the waypoint and hold position until the group knows enough about an enemy unit to identify which side that belongs to, and that they are capable of attacking. At that point, the group will proceed to their next waypoint. They will normally also attack the spotted enemy on the way.

See:

http://community.bistudio.com/wiki/ArmA:_Mission_Editor

I think the problem can be solved by scripting.

Just an idea:

  • Clear all group waypoints. Put in a single "MOVE" waypoint.
  • Set combatMode for group to "BLUE" when waypoint is reached.
  • create a script that "waitUntil" till behaviour for group leader switches to "COMBAT"
  • moveIncargo, moveInDriver, etc. units
  • Set combatMode for group to whatever.

Then make them do what is needed ...

A second (better) thought: maybe it's more simple to just create a script the loops and forces units to moveIncargo, moveInDriver, etc. when behaviour == "COMBAT", if they're not in the vehicle

Board_on_danger.sqf

// ------------------------------------------------
// Board_on_danger.sqf
// ------------------------------------------------
// call instruction:
// _ret = [groupName] execVM "Board_on_danger.sqf";
// ------------------------------------------------

_grp = _this select 0;

while {count units _grp > 0} do
{
if(behaviour leader _grp == "COMBAT") then
{
	{
		_veh = assignedVehicle _x;

		if(alive _x and format["%1", _veh] != "<NULL-object>" and vehicle _x == _x) then
		{
			_role = (assignedVehicleRole _x) select 0;

			if(format["%1", _role] != "") then
			{
				compile call format["_x moveIn%1 %2", _role, _veh];
			};
		};

	} foreach units _grp;
            sleep(5);
};
sleep(1);
};

BEWARE: script syntax was NOT CHECKED (wrote it now, at work :)).

Edited by fabrizio_T

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×