Posted: . At: 9:16 PM. This was 5 years ago. Post ID: 12841
Page permalink. WordPress uses cookies, or tiny pieces of information stored on your computer, to verify who you are. There are cookies for logged in users and for commenters.
These cookies expire two weeks after they are set.



Sponsored



How to get player icons that show friendly players with Arma 3 without extra scripts.


To get player icons for IFF in a multiplayer mission, use this code.

_iff = [units group player] execVM "a3\missions_f_exp\campaign\functions\fn_exp_camp_iff.sqf";

Put it in the initPlayerLocal.sqf and players will have a hexagon on them, and when they are aimed it, it will show their name above it. There are so many scripts out there that do this, but this is built into the game and you do not need to add bloat to your mission to use this simple feature. This script is from the APEX campaign of Arma 3, and works very well in a multiplayer environment.

This part of the code I added makes an array out of the players group members and then uses it to render the icons for each member.

units group player

This is how to select the first member of a group.

(units _mgguy13) select 0)

This way, a code can give orders to the first member of a group.

Like this.

// Spawn a gunner to guard the HQ.
 
// -------------------------------------------------------------------------------------------
 
_randPos14 = [Loc, 0, 95, 12, 0, 0.3, 0] call BIS_fnc_findSafePos;
 
_mg13 = createVehicle ["rhs_KORD_high_MSV", _randPos14, [], 0, "CAN_COLLIDE"];
 
_mgguy13 = [_randPos14, EAST, ["rhsgref_ins_machinegunner"],[],[],[],[],[],232] call BIS_fnc_spawnGroup;
 
((units _mgguy13) select 0) moveInGunner _mg13;
_mgguy13 enableDynamicSimulation true;

This selects the first member of a group and puts him in charge of a mounted gun.

Another example. Spawning a group and then putting them each in separate guns.

_randPos333 = [Loc, 1, 60, 3, 0, 20, 0] call BIS_fnc_findSafePos;
_mgguys = [Loc, EAST, (configfile >> "CfgGroups" >> "East" >> "LOP_AM_OPF" >> "Infantry" >> "LOP_AM_OPF_Fireteam")] call BIS_fnc_spawnGroup;
((units _mgguys) select 0) moveInGunner gun1;
((units _mgguys) select 1) moveInGunner gun2;
((units _mgguys) select 2) moveInGunner gun3;
((units _mgguys) select 3) moveInGunner gun4;
_mgguys enableDynamicSimulation true;

This is very useful, I can spawn 4 guns in an area, and then man them with each group member.

Arma 3 with built-in player icon IFF script.
Arma 3 with built-in player icon IFF script.

Working script sample to spawn a man in a random house in a certain radius. This works very well in my mission and someone might find this to be very useful.


Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.