Skip to content

Instantly share code, notes, and snippets.

//shows values for the surface you are currently standing on
//friction, maxSpeedCoef, surfaceFriction, rough, dust, impact, soundEnviron, soundHit
_surface = surfaceType getPosWorld (vehicle player);
_surface = _surface select [1, count _surface - 1];
_config = configFile >> "CfgSurfaces" >> _surface;
_friction = [_config, "friction", -69] call BIS_fnc_returnConfigEntry;
_maxSpeedCoef = [_config, "maxSpeedCoef", -69] call BIS_fnc_returnConfigEntry;
_surfaceFriction = [_config, "surfaceFriction", -69] call BIS_fnc_returnConfigEntry;
//+ icons for all surfaces within a grid of _size of the player, spaced out at a distance of _spacing
//only showing names of surfaces within 5 meters of player to avoid clutter
availableColors = [
[1,1,1,1],
[0,0,0,1],
[1,0,0,1],
[0,1,0,1],
[0,0,1,1],
[1,1,0,1],
[1,0,1,1],
//copy all loaded CfgPatches to clipboard in the format of ["A3Data","A3_3DEN_Language",....]
_configs = "true" configClasses (configFile >> "CfgPatches");
{
_configs set [_foreachIndex, configName _x]
} foreach _configs;
copyToClipboard str _configs;
//+ icons on all building positions (used by AI and mission makers for loot)
buildingPositions = addMissionEventHandler ["Draw3D", {
_positions = nearestBuilding player buildingPos -1;
{
drawIcon3D ["\a3\ui_f\data\gui\cfg\cursors\add_gs.paa", [0,0,0,1], _x, 0.75, 0.75, 0, format["Position %1",_foreachIndex+1]];
} foreach _positions;
}];
//removed with
removeMissionEventHandler ["Draw3D", buildingPositions];
//+ icons on all named selections from resolution LODs
buildingSelections = addMissionEventHandler ["Draw3D", {
_obj = nearestBuilding player;
_selections = selectionNames _obj;
_selections apply {
_modelPos =_obj selectionPosition [_x, "FireGeometry"];
if!(_modelPos isEqualTo [0,0,0]) then {
drawIcon3D ["\a3\ui_f\data\gui\cfg\cursors\add_gs.paa", [0,0,0,1], _obj modelToWorldVisual _modelPos, 0.75, 0.75, 0, _x];
};
};