#include "..\script_component.hpp"

{
	private _configName = configName(_x);
	private _className = (missionConfigFile >> "CfgCpofs" >> "cpofs" >> _configName >> "className") call BFUNC(getCfgData);
	private _pos = (missionConfigFile >> "CfgCpofs" >> "cpofs" >> _configName >> "pos") call BFUNC(getCfgData);
	private _dir = (missionConfigFile >> "CfgCpofs" >> "cpofs" >> _configName >> "dir") call BFUNC(getCfgData);

	private _cpof = createSimpleObject [_className, [0, 0, 0]];

	_cpof setPosATL _pos;
	_cpof setDir _dir;
	_cpof allowDamage false;
	_cpof setVariable ["isCPOF", true, true];

	diag_log text format ["[FORGE Admin] ClassName: '%1' Pos: '%2' Dir: '%3'", _className, _pos, _dir];

} forEach ("true" configClasses (missionConfigFile >> "CfgCpofs" >> "cpofs"));