Skip to content

Instantly share code, notes, and snippets.

View jameslkingsley's full-sized avatar

James Kingsley jameslkingsley

View GitHub Profile
/////////// HPP ///////////////////////////
void add_weapon_item(const object& obj_, const std::string& weapon_name_, const std::string& item_name_);
void add_weapon_item(const object& obj_, const std::string& weapon_name_, const std::string& item_name_, int ammo_count_ = 1, const std::string& muzzle_name_ = "");
/////////// CPP ///////////////////////////
void add_weapon_item(const object& obj_, const std::string& weapon_name_, const std::string& item_name_) {
game_value params({
weapon_name_,
item_name_
});
void add_weapon_item(const object& obj_, const std::string& weapon_name_, const std::string& item_name_);
void add_weapon_item(const object& obj_, const std::string& weapon_name_, const std::string& item_name_, int ammo_count_);
void add_weapon_item(const object& obj_, const std::string& weapon_name_, const std::string& item_name_, int ammo_count_, const std::string& muzzle_name_);
///////////////////////////////////////////////////////////////////////
void add_weapon_item(const object& obj_, const std::string& weapon_name_, const std::string& item_name_) {
game_value params({
weapon_name_,
item_name_
/*
Default jog: AmovPercMrunSlowWrflDf 1.396s
Sprint: AmovPercMevaSlowWrflDf 0.621s
*/
_handle = _this spawn {
private ["_unit", "_dest"];
_unit = _this select 0;
_dest = _this select 1;
{
//_x disableAI "MOVE"; // Disables move to enable animations
[_x, _grp, _cover] spawn {
PARAMS_3(_x,_grp,_cover);
while {(_x distance _cover) > 1} do {
_coverdir = [(getpos leader _grp), getpos _cover] call BIS_fnc_dirTo;
_grp setFormDir _coverdir;
_x setDir _coverdir;
_sup = getSuppression _x;
if (_sup > 0.2) then {
if (!isServer) exitWith {};
[] spawn {
_protected = [];
while {true} do {
{
_unit = _x;
if (!isPlayer _unit && !(_unit in _protected)) then {
_group = group _unit;
_isHandled = _unit getVariable ["ARC_aiHandled", false];
if (!isServer) exitWith {};
[] spawn {
_protected = [];
while {true} do {
{
_unit = _x;
if (!isPlayer _unit && !(_unit in _protected)) then {
_group = group _unit;
_isHandled = _unit getVariable ["ARC_aiHandled", false];
rifles[] = {
{"rhs_weap_ak74m_2mag", 0.75},
{"another_rifle", 0.25}
};
// Place your settings in this file to overwrite the default settings
{
"files.exclude": {},
"window.openFilesInNewWindow": false,
"window.reopenFolders": "all",
"editor.roundedSelection": false,
"editor.insertSpaces": false,
"editor.fontSize": 14,
"editor.wrappingColumn": 0
}
_faction = param [0, "opfor"];
_category = param [1, "uniforms"];
_unit = param [2, "o_g_soldier_unarmed_f"];
_specialunits = ["O_Soldier_F", "O_Soldier_GL_F", "O_Soldier_AR_F", "O_Soldier_LAT_F"];
_specialclass = ["rifleman", "grenadier", "autorifleman", "antitank"];
_items = [""],
_itemarr = [];
_result = [];
_proarr = [];
_proportion = [];
[b][size=+2]ARCOMM Mission Framework[/size][/b]
[b][size=+2][url=https://github.com/ARCOMM/ARCMF/releases]Download ARCMF[/url][/size][/b]
Our mission framework is an adaptation of the [url=https://github.com/ferstaberinde/F3]F3 framework[/url] created by [url=https://github.com/ferstaberinde]Ferstaberinde[/url]. It is designed to be robust, easily customisable and open for expansion. For some documentation on how to add custom functions and the basics of SQF scripting, head over to the [url=https://github.com/ARCOMM/ARCMF/wiki/Documentation]documentation page here[/url]. For tutorials on how to create your first mission from start to finish head over to the [url=https://github.com/ARCOMM/ARCMF/wiki/Tutorials]tutorials page here[/url].
[b][size=+2][url=https://www.youtube.com/playlist?list=PLZUKGmWyiGFcSq6634KwaUikH8rJviByE]Video Tutorial Series[/url][/size][/b]
[b][size=+1]Steam Discussions[/size][/b]
[url=http://steamcommunity.com/groups/ARCOMM/discussions/0/451851477874827984/]ARCMF - Mission Framework[/