Search the Community
Showing results for tags 'get'.
Found 4 results
-
The Dismount mod allows the player to exit the vehicle at the point closest to where they are looking. Steam: https://steamcommunity.com/sharedfiles/filedetails/?id=1841553455 https://github.com/ampersand38/dismount-where-you-look/releases/latest
- 39 replies
-
- 16
-
Dialog Control Group - Child ID depending on Parent ID
kingofnuthin1980 posted a topic in ARMA 3 - ADDONS - CONFIGS & SCRIPTING
Hello Arma-Community, can I define the child ID in a control group, depending on the parent ID? Example: One control group, e.g. for a header with text and an underline. The text should be dynamic. In a Dialog, the Text ID should be always the Group ID + 1. There shouldn't be a class for the child text in every header I use, just in the base class. In Config: class _CTRL_GROUP { type = 15; idc = -1; . . class Controls { class _CT_TEXT { idc = Use Parent IDC + 1; }; class _CT_LINE { idc = -1; }; }; }; In Dialog: class Rsc_GroupHeader_1: _CTRL_GROUP { idc = 100; }; class Rsc_GroupHeader_2: _CTRL_GROUP { idc = 200; }; In SQF: ctrlSetText [101,"Text 1"]; ctrlSetText [201,"Text 2"]; Thank you for helping! -
HI. Maybe someone can find this usable. Iterate trough config weapon classes and returns array of weapons/ammo according to given parameters /* file : fnc_getWeapon.sqf author: DaVidoSS description: Iterate trough config weapon classes and returns array of weapons/ammo according to given parameters parameters: 0: STRING one from listed below "assault" "handgun" "submachine" "rocket launcher" "missile launcher" "grenade launcher" "light machine" "medium machine" "marksman" "sniper" "all" 1: SCALAR or STRING "all" for all available classes of param 0 NUMBER classes of param 0 2: BOOLEAN true - for return ammo classes too in form ["weapon",["ammo","ammo"...]] false - for return without ammo classes in form ["weapon","weapon"...] Return: ARRAY Usage: fnc_getWeapon = compileFinal preprocessFileLineNumbers "fnc_getWeapon.sqf"; _10assaultGunsWithAmmo = ["assault" ,10,true] call fnc_getWeapon; _1MarksmanGunWithoutAmmo = ["marksman" ,1,false] call fnc_getWeapon; _allGunsofAllTypeWithAmmo = ["all","all",true] call fnc_getWeapon; */ private _paramsCheck = params [["_type","all",[""]],["_allof","all",["",0]],["_withMags",false,[true]]]; if (!_paramsCheck) exitWith {["***********ERROR:fnc_getWeapon - exiting due wrong params given %1",str _this] call BIS_fnc_error; false}; private _array = []; private _return = []; { private _class = (configName _x); if (getNumber (configfile >> "CfgWeapons" >> _class >> "type") < 5) then { private _magazines = getArray (configfile >> "CfgWeapons" >> _class >> "magazines"); private _name = toLower (getText (configfile >> "CfgWeapons" >> _class >> "descriptionShort")); if !(_magazines isEqualTo []) then { if (toLower _type != "all") then { if ((_name find (toLower _type)) > -1) then { if (_withMags) then { _array pushBack [_class,_magazines]; } else { _array pushBack _class; }; }; } else { if (_withMags) then { _array pushBack [_class,_magazines]; } else { _array pushBack _class; }; }; }; }; } forEach ("isClass _x && {(getNumber (_x >> 'scope')) isEqualTo 2}" configClasses (configfile >> "CfgWeapons")); switch (true) do { case (_allof isEqualType 0): { if (_allof isEqualTo 1) exitWith { _return pushBack (selectRandom _array); }; if (_allof > 1 && {count _array >= _allof}) then { for "_i" from 1 to _allof do { _return pushBackUnique (selectRandom (_array - _return)); }; } else { if (_allof < 1) exitWith {_return pushBack (selectRandom _array)}; _return = _array; }; }; case (_allof isEqualType ""): { _return = _array; }; default {}; }; (_return) Enjoy :-)
-
Get an array of units's classnames with configclass
Crazy_Man posted a topic in ARMA 3 - MISSION EDITING & SCRIPTING
Hello, I need help in creating an array of all zombies (Ryan's Zombies and demons mod) that exist on one side. For the moment i have this : zombies = "getNumber (_x >> 'side') == 0" configClasses (configFile >> "CfgVehicles"); But I miss one condition (maybe a getText) to have all the zombies' class. Like that : getText (_x >> '????') == ???? Can anyone help me?