Arma 3
Yappi Dude Jul 31, 2020 @ 9:36am
How to allow wearing enemy uniforms?
Hello. I need this feature in my mission. Maybe any mods or scripts?
< >
Showing 1-4 of 4 comments
Fenris 89 Jul 31, 2020 @ 7:55pm 
I have 2 variants! In the first have to change the uniform className to them which you would need! I´m not sure now: In the the second you have to give the ai unit an name and change "bob1" !

currentUniform = uniform player;


player addEventHandler ["InventoryClosed",
{
_uniform = uniform player;
if !(_uniform isEqualTo currentUniform) then
{
player forceAddUniform "U_B_CombatUniform_mcam";
_opGroup = createGroup EAST;
[player] joinSilent _opGroup;
};
}];


or

{
if !(isPlayer _x) then
{
_x addEventHandler ["Killed",
{
params ["_unit", "_killer"];
_unitSide = side _unit;
_uniform = uniform _unit;
if !((side _unit) isEqualTo (side _killer)) then
{
_unit addAction ["Take Uniform",
{
_deadSide = (_this select 3) select 0;
_uniform = (_this select 3) select 1;
removeAllActions bob1;
_grp = createGroup _deadSide;
[player] joinSilent _grp;
player forceAddUniform _uniform;
}, [_unitSide, _uniform], 0, false, true, "", "", 2];
};
}];
};
} forEach allUnits;
Yappi Dude Aug 1, 2020 @ 2:19am 
Originally posted by Fenris:
I have 2 variants! In the first have to change the uniform className to them which you would need! I´m not sure now: In the the second you have to give the ai unit an name and change "bob1" !

currentUniform = uniform player;


player addEventHandler ["InventoryClosed",
{
_uniform = uniform player;
if !(_uniform isEqualTo currentUniform) then
{
player forceAddUniform "U_B_CombatUniform_mcam";
_opGroup = createGroup EAST;
[player] joinSilent _opGroup;
};
}];


or

{
if !(isPlayer _x) then
{
_x addEventHandler ["Killed",
{
params ["_unit", "_killer"];
_unitSide = side _unit;
_uniform = uniform _unit;
if !((side _unit) isEqualTo (side _killer)) then
{
_unit addAction ["Take Uniform",
{
_deadSide = (_this select 3) select 0;
_uniform = (_this select 3) select 1;
removeAllActions bob1;
_grp = createGroup _deadSide;
[player] joinSilent _grp;
player forceAddUniform _uniform;
}, [_unitSide, _uniform], 0, false, true, "", "", 2];
};
}];
};
} forEach allUnits;
Fenris, second variant should be pasted into description.ext?
Fenris 89 Aug 1, 2020 @ 4:02am 
I´m not sure now, try both (desription.ext or init.sqf) !
< >
Showing 1-4 of 4 comments
Per page: 1530 50

Date Posted: Jul 31, 2020 @ 9:36am
Posts: 4