Bug #3476

Using leaveVehicle command produces unexpected results.

Added by Chaos over 5 years ago. Updated over 4 years ago.

Status:Closed Start date:08/08/2009
Priority:Normal Due date:
Assignee:Suma % Done:

30%

Category:Scripting: Problem
Target version:1.55.75445
Affected ArmA II version: First affected build:
Reproduced by another DH user:No First affected ArmA II version:
I am using some Mods:No Single / Multi Player?:
I am using: BIForumURL:
Reproducible for you:No NGUrl:
Related to content of DLC: WIKIurl:

Description

There is a scripting problem with unloading of troop in cargo of LAV25 (and i think any other APC).

1 _veh = vehicle player;
2 _troop1 = crew _veh - [gunner _veh] - [driver _veh] - [commander _veh];
3 sleep (random 2);
4 hintc format ["%1",_troop1];
5 {_x leavevehicle _veh} forEach _troop1;

Will affect all units in the vehicle to get out. No only the infantry, the vehicle crew leaves the apc too.

More detailed topic with short demomission:
http://forums.bistudio.com/showthread.php?t=82869

I am not sure, but i think, that was not present in version 1.02.

UNLOAD_TEST2.utes.rar - demomission here (2.4 kB) Chaos, 08/08/2009 14:57

CIT_3476_sqs.utes.7z (1.3 kB) Squelch, 08/10/2009 13:32

CIT_3476_sqf.utes.7z (1.3 kB) Squelch, 08/10/2009 13:32


Related issues

blocked by ARMA2 Community Issue Tracker - Bug #4010: Crew of UH-1y cannot be made to disembark with unassignVe... Closed 08/25/2009

History

Updated by kju over 5 years ago

  • Priority changed from High to Normal

Updated by kju over 5 years ago

  • Due date set to 08/24/2009
  • Status changed from New to Feedback

What is the value of _troop1? Crew included?

Is 1 leaveVehicle even the right command?
According to the BIKI it accepts a group and not single units!

So you need to use action eject or unassignVehicle I think.

Updated by Chaos over 5 years ago

You can´t see what is _troop1 ?

1 _troop1 = crew _veh - [gunner _veh] - [driver _veh] - [commander _veh];

So are this units in cargo of the vehicle. But you can made it so:

1 _troop1 = infantry1; 2 _troop1 leavevehicle _veh;

No difference - all units in the apc ejecting the vehicle.

For more see in the linked BIF topic and the demomission.

This bug is since 1.03.

Update:
I checked my old missions from ARMA1 - that command was working with ARMA1 - this must be also a bug because my script was working with ARMA2 1.02 too.

Updated by Squelch over 5 years ago

LeaveVehicle is behaving badly, but I also tested your mission in 1.02, and it showed the same behaviour.

Attached, are two missions CIT_3476_sqs.utes and CIT_3476_sqf.utes to prove that it is not the script type. The behaviour is identical in both. I have included a less convoluted variation of unloading from the original mission (method 1), and a suggested workaround that performs correctly for comparison. (method 2). I have also included some on screen debugging output by way of radio messages.

Reproduction

  1. Load and preview either of the CIT* missions.
  2. Wait to be disembarked.
  3. Observe other APC to the South.

Results

  • APC1 (Player group) disembarks correctly. Crew stays on board (method 2 - unassignVehicle)
  • APC2 crew sends message of their assigned vehicle and roles. (Pre unloading - see notes)
  • APC2 to south disembarks including crew.(method 1 - leaveVehicle)
  • APC2 crew sends message of their assigned vehicle and roles (Time of unloading - see notes)
  • APC2 commander attempts to remount APC2 and fails.
  • APC2 commander orders crew to mount APC2
  • Two crew successfully mount APC.
  • APC2 crew sends message of their assigned vehicle and roles. (Post unloading - see notes).

Expected

  • leaveVehicle dismounts the whole group in cargo.
  • UnassignVehicle automatically dismounts each of the group in cargo.
  • Crew stays on board in both cases.

Notes

The players group dismounts first and uses unassignVehicle. When dismounted watch the second APC using leaveVehicle method, and note the Pre unloading messages. The commander dismounts first from his group, and then attempts to remount immediately. The Time of unloading messages show no vehicle or role assignments for any original crew member. the commander having failed to mount, will order the other crew members into the APC. The Post unloading messages show their assignments, and the commander has been assigned the driver role. The other two members will have any random role assigned

When the unloading cycle has completed, both APC commanders give a move order. The Players APC moves successfully, but the second APC cannot, as the assigned driver is dismounted and makes no attempt to mount again.

Updated by Squelch over 5 years ago

  • Subject changed from Unloading of units to Using leaveVehicle command produces unexpected results.

Updated by Fireball over 5 years ago

  • Due date changed from 08/24/2009 to 10/24/2009

Updated by Dwarden over 5 years ago

  • Assignee set to Dwarden

Updated by Fireball over 5 years ago

  • Affected ArmA II version changed from 1.03.58627 to 1.04.59026

I suppose nothing changed for 1.04.

Updated by Dwarden over 5 years ago

  • Priority changed from Normal to High
  • Target version set to 1.05 BETA
  • Reproduced by another DH user set to No
  • CPU set to Please specify!

Updated by Fireball over 5 years ago

  • Due date changed from 10/24/2009 to 11/24/2009

Updated by kju over 5 years ago

  • Target version changed from 1.05 BETA to Upcoming version

Updated by Dwarden about 5 years ago

  • Status changed from Assigned to Feedback

if the crew is in same group (even after being substracted from the array) it will unassign and leave the vehicle for the crew ...

Updated by Fireball about 5 years ago

  • Due date changed from 11/24/2009 to 01/24/2010

Updated by kju about 5 years ago

  • Due date changed from 01/24/2010 to 03/04/2010

Updated by kju about 5 years ago

  • Due date deleted (03/04/2010)
  • Status changed from Feedback to Expired
  • Assignee deleted (Dwarden)
  • Priority changed from High to Normal

Unfortunately no feedback. Please reopen if still an issue and provide fresh info. Ty.

Updated by kju about 5 years ago

  • Target version deleted (Upcoming version)

Updated by mike almost 5 years ago

Still a problem. leaveVehicle still makes everyone in the vehicle disembark, even if you use a separate group for crew and dismounts.

The provided repro mission also still shows faulty behaviour.

Updated by Dwarden over 4 years ago

  • Status changed from Expired to Assigned
  • Assignee set to Dwarden
  • Affected ArmA II version deleted (1.04.59026)
  • Audio card set to Please specify!
  • Size of OS swap file set to Please specify!
  • I am using some Mods set to No
  • Reproducible for you set to No

anyone willing to recheck this with 73246 as it fixing something very very similar

Updated by kju over 4 years ago

  • Due date set to 10/01/2010
  • Status changed from Assigned to Feedback

Updated by Suma over 4 years ago

  • Due date changed from 10/01/2010 to 11/01/2010
  • Status changed from Feedback to Assigned
  • Assignee changed from Dwarden to Suma
  • % Done changed from 0 to 30

Still issue, but should be easy to fix now.

Updated by Suma over 4 years ago

  • Status changed from Assigned to Resolved

Should be fixed in 73333

Updated by kju over 4 years ago

  • Due date deleted (11/01/2010)
  • Target version set to Upcoming version

Excellent. Thank you Suma!

Updated by Fireball over 4 years ago

  • Due date set to 10/05/2009
  • Target version changed from Upcoming version to 1.55 BETA

Updated by kju over 4 years ago

  • Due date deleted (10/05/2009)
  • Status changed from Resolved to Closed

Confirmed fixed.

AI driver, gunner and commander stay in the vehicle and move on.

Updated by kju over 4 years ago

  • Target version changed from 1.55 BETA to 1.55.75445

Also available in: Atom PDF