Jump to content
jarni

Hostage is killed even if group is OPFOR

Recommended Posts

Hello community,

 

I want to create a situation when there is a BLUEFOR hostage of class B_soldier_repair_F (with some ambient animation like PRONE_INJURED) and a group of OPFOR units guarding him. There is a trigger which changes hostage's group to player's. Works perfectly if ran from editor or as exported mission. But I got into troubles when trying to do this from script.

1. If hostage is (WEST, B_soldier_repair_F), he is killed immediately by OPFOR guards after being spawned.

2. If hostage is (CIV, B_soldier_repair_F) result is the same. Civilians do not have soldier_repair_F class, afaik

3. If hostage is (EAST, B_soldier_repair_F) result is the same!!!

4. If hostage is (EAST, O_soldier_repair_F) all works fine.

5. If hostage is (WEST, O_soldier_repair_F) all works fine!!!

 

So, it seems like OPFOR units completely ignore group and look at the unit class only.

I might have gone with option 4 or 5, but O_* classes are CSATs with arabic names, faces, voices etc. I do set name, face and voice explicitly but the engine seems to ignore that. I even tried to do this twice, once when unit is created and the second time when group changing trigger is executed. Name, face and voice are changed in that case, but not the unit name shown in group units list. See following screenshots

O_solder_repair_F after spawn and joining player group: name, face and voice are arabic

312c67ac736e6dec27656efd3d6fb45b5e707836

 

O_solder_repair_F after running

unit_o setRank "CORPORAL"; 
unit_o setname "Greer Lee"; 
unit_o setface "GreekHead_A3_05"; 
unit_o setspeaker "Male01ENG"; 
unit_o setpitch 1.03;

b91b3d5415bd31652c67a341b07ca6b75e707836

 

So, there are couple of questions bugging me:

1. How can I spawn WEST unit which is ignore by EAST units?

2. If above is impossible, how can I spawn EAST CSAT (arabic) unit but with ensured custom name, face, voice settings?

 

I've also noticed that even though I spawn hostage with empty inventory, he, sometimes, is spawned with glasses. Not a problem, but looks like the engine ignores different bits of unit setup.

 

The test scenario and spawn scripts are here: https://www.dropbox.com/s/ow77tugr7pfiexc/group_test.altis.zip?dl=0

or here

spawn_east.sqf

Spoiler

unit_group_o = createGroup east;
unit_o = unit_group_o createUnit ["O_soldier_repair_F",[13289.9,21219.1,0],[],0,"CAN_COLLIDE"];
unit_group_o selectLeader unit_o;
unit_o setPosWorld [13289.9,21219.1,0];
unit_o setVectorDirAndUp [[0,1,0],[0,0,1]];
unit_o setUnitLoadout [[],[],[],["U_B_CombatUniform_mcam",[]],[],[],"","",[],["","","","","",""]];
unit_o setSkill 1;
unit_o setDamage [0.854012,false];
unit_o setVehicleAmmo 0;
unit_o setRank "CORPORAL";
unit_o setname "Greer Lee";;
unit_o setface "GreekHead_A3_05";;
unit_o setspeaker "Male02ENG";;
unit_o setpitch 1.02866;;

spawn_west.sqf

Spoiler

unit_group_b = createGroup east;
unit_b = unit_group_b createUnit ["B_soldier_repair_F",[13289.9,21219.1,0],[],0,"CAN_COLLIDE"];
unit_group_b selectLeader unit_b;
unit_b setPosWorld [13289.9,21219.1,0];
unit_b setVectorDirAndUp [[0,1,0],[0,0,1]];
unit_b setUnitLoadout [[],[],[],["U_B_CombatUniform_mcam",[]],[],[],"","",[],["","","","","",""]];
unit_b setSkill 1;
unit_b setDamage [0.854012,false];
unit_b setVehicleAmmo 0;
unit_b setRank "CORPORAL";
unit_b setname "Greer Lee";;
unit_b setface "GreekHead_A3_05";;
unit_b setspeaker "Male02ENG";;
unit_b setpitch 1.02866;;

 

Share this post


Link to post
Share on other sites

1. Use setCaptive to make a hostage situation.

2. You can remove glasses with removeGoggles.

3. If some of things can't change, like face you mentioned, I'd suggest to use sleep a bit before execution of change and see if works.

Share this post


Link to post
Share on other sites
On 1/11/2020 at 11:05 PM, POLPOX said:

1. Use setCaptive to make a hostage situation.

That did the trick. Thank you!

 

On 1/11/2020 at 11:05 PM, POLPOX said:

2. You can remove glasses with removeGoggles.

I can, the question is why it is added in the first place.

 

On 1/11/2020 at 11:05 PM, POLPOX said:

3. If some of things can't change, like face you mentioned, I'd suggest to use sleep a bit before execution of change and see if works. 

Will try that out, thank you.

Share this post


Link to post
Share on other sites

Goggles, faces, and headgear are some things that get randomized on a lot of units because there's a script which runs everytime units are created to randomized them. To disable this, you can add disableRandomization[] in the description.ext:

disableRandomization[]={"AllUnits"};

 

Share this post


Link to post
Share on other sites
On 1/19/2020 at 10:26 AM, phronk said:

To disable this, you can add disableRandomization[] in the description.ext

Thank you. Will try that out.

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

×