Jump to content

mrchooch

Member
  • Content Count

    18
  • Joined

  • Last visited

  • Medals

Everything posted by mrchooch

  1. How do you get the achievement "No Requiem"? I finished the "Altis Requiem" campaign but didn't get it
  2. mrchooch

    Laws of War DLC Assets

    How do you drop leaflets from drones? Cant seem to figure it out
  3. mrchooch

    Orange DLC (wild) SPECULATIONS !!!

    http://www.etana.org/node/1407 Archaeology DLC confirmed? :p
  4. mrchooch

    Apex Gear Feedback

    Not sure if this is the right place but it would be nice if in the ingame arsenal it showed the respective DLC icon next to DLC gear, similar to how it is done in the eden editor
  5. mrchooch

    Apex Props Feedback

    I've noticed that a few things are missing from the Eden Editor, such as that big hangar at the main airport
  6. fn_initModuleVehicles.sqf /* * @Author: DnA * @Profile: http://steamcommunity.com/id/dna_uk * @Date: 2014-05-15 07:22:33 * @Last Modified by: DnA * @Last Modified time: 2014-09-25 07:31:02 */ private "_mode"; _mode = [ _this, 0, "", [""] ] call BIS_fnc_param; switch _mode do { case "preInit": { //--- Spawn vehicle array NMD_ModuleVehicles_spawned = []; //--- Process CfgPatches units _list = [ [], [], [], [] ]; _factions = [ [], [], [], [] ]; _vehicleClasses = [ [], [], [], [] ]; _blacklist = []; { { _className = toLower _x; _types = [ "Car_F", "Tank_F", "Ship_F", "Air", "StaticWeapon" ]; _isVehicle = false; //--- Check if vehicle is correct type { if ( _className isKindOf _x ) exitwith { _isVehicle = true } } foreach _types; //--- Proceed if vehicle is correct type if ( _isVehicle && { !( _className in _blacklist ) } ) then { //--- Add className to blacklist _blacklist pushBack _className; _cfg = configfile >> "CfgVehicles" >> _className; _side = getNumber ( _cfg >> "side" ); _public = getNumber ( _cfg >> "scope" ) == 2; //--- Proceed if scope is public and side not empty if ( _public && _side <= 3 ) then { _displayName = getText ( _cfg >> "displayName" ); _icon = ( getText ( _cfg >> "icon" ) ) call BIS_fnc_textureVehicleIcon; _faction = toLower ( getText ( _cfg >> "faction" ) ); _vehicleClass = toLower ( getText ( _cfg >> "vehicleClass" ) ); //--- Add faction to factions array if ( !( _faction in ( _factions select _side ) ) ) then { private [ "_cfg", "_displayName", "_icon" ]; _cfg = configfile >> "CfgFactionClasses" >> _faction; _displayName = getText ( _cfg >> "displayName" ); _icon = getText ( _cfg >> "icon" ); //--- Add faction to factions -> side array _factions select _side pushBack _faction; //--- Add empty array to vehicle clases -> side array _vehicleClasses select _side pushBack []; //--- Add faction array to _list -> side array _list select _side pushBack [ _displayName, _icon, [] ]; }; //--- Add vehicle class to vehicle classes array _factionIndex = ( _factions select _side find _faction ); if ( !( _vehicleClass in ( ( _vehicleClasses select _side ) select _factionIndex ) ) ) then { private [ "_cfg", "_displayName" ]; _cfg = configfile >> "CfgVehicleClasses" >> _vehicleClass; _displayName = getText ( _cfg >> "displayName" ); //--- Add vehicle class to vehicle classes -> side -> faction array ( _vehicleClasses select _side ) select _factionIndex pushBack _vehicleClass; //--- Add vehicle class array to list -> side -> faction array ( ( _list select _side ) select _factionIndex ) select 2 pushBack [ _displayName, [] ]; }; //--- Add vehicle to list -> side -> faction -> vehicle class array _vehicleClassIndex = ( ( ( _vehicleClasses select _side ) select _factionIndex ) find _vehicleClass ); [ ( ( ( ( _list select _side ) select _factionIndex ) select 2 ) select _vehicleClassIndex ) select 1 pushBack [ _displayName, _icon, _className ] ]; }; }; } forEach getArray ( _x >> "units" ); } forEach ( "true" configClasses (configFile >> "CfgPatches" ) ); //--- Update global list NMD_ModuleVehicles_list = _list; }; case "postInit": { //--- Params NMD_ModuleVehicles_garageLimit = ( [ "NMD_ModuleVehicles_GarageLimit", 4 ] call BIS_fnc_getParamValue ); NMD_ModuleVehicles_garageGC = ( [ "NMD_ModuleVehicles_GarageGC", 120 ] call BIS_fnc_getParamValue ); NMD_ModuleVehicles_serviceCooldown = ( [ "NMD_ModuleVehicles_ServiceCooldown", 60 ] call BIS_fnc_getParamValue ); }; }; RscDisplayGarage.sqf /* * @Author: DnA * @Profile: http://steamcommunity.com/id/dna_uk * @Date: 2014-04-24 09:20:06 * @Last Modified by: DnA * @Last Modified time: 2014-09-25 09:10:39 */ #include "define.inc" private [ "_mode", "_params" ]; _mode = _this select 0; _params = _this select 1; switch _mode do { case "onLoad": { //--- Controls _display = ( _params select 0 ); //--- Control Filters { _ctrl = _display displayCtrl _x; _ctrl ctrlAddEventHandler [ "ButtonClick", format [ " [ 'onFilterChanged', [ ctrlParent ( _this select 0 ), %1 ] ] call NMD_RscDisplayGarage ", _forEachIndex ] ]; } forEach [ IDC_RSCDISPLAYGARAGE_FILTER2, IDC_RSCDISPLAYGARAGE_FILTER1, IDC_RSCDISPLAYGARAGE_FILTER3, IDC_RSCDISPLAYGARAGE_FILTER4, IDC_RSCDISPLAYGARAGE_FILTER0 ]; //--- Call filter EH NMD_RscDisplayGarage_filter = missionNamespace getVariable [ "NMD_RscDisplayGarage_filter", 4 ]; [ "onFilterChanged", [ _display ] ] call NMD_RscDisplayGarage; //--- Control ListVehicles _ctrlTreeVehicles = _display displayCtrl IDC_RSCDISPLAYGARAGE_TREEVEHICLES; //--- Control ListVehicles _ctrlIconVehicle = _display displayCtrl IDC_RSCDISPLAYGARAGE_ICONVEHICLE; [ _ctrlIconVehicle, 0.8, 0 ] call BIS_fnc_ctrlSetScale; //--- Scale down //--- Control ButtonSpawn _ctrlButtonSpawn = _display displayCtrl IDC_RSCDISPLAYGARAGE_BUTTONSPAWN; _ctrlButtonSpawn ctrlAddEventHandler [ "ButtonClick", { [ "spawnVehicle", [ ctrlParent ( _this select 0 ) ] ] call NMD_RscDisplayGarage } ]; //--- Set default control focus ctrlSetFocus _ctrlTreeVehicles; }; ///////////////////////////////////////////////////////////////////////////////// case "onUnload": { }; ///////////////////////////////////////////////////////////////////////////////// case "onFilterChanged": { //--- Controls _display = _params select 0; _ctrlTreeVehicles = _display displayCtrl IDC_RSCDISPLAYGARAGE_TREEVEHICLES; _ctrlBackgroundFilter = _display displayCtrl IDC_RSCDISPLAYGARAGE_BACKGROUNDFILTER; _list = NMD_ModuleVehicles_list; _curSel = if ( count _params > 1 ) then { _params select 1 } else { NMD_RscDisplayGarage_filter }; _list = if ( _curSel == 4 ) then { _return = []; { _return = _return + _x } forEach _list; _return } else { _list select _curSel }; //--- Remove treeview EH _ctrlTreeVehicles ctrlRemoveAllEventHandlers "TreeSelChanged"; //--- Clear treeview tvClear _ctrlTreeVehicles; //--- Populate treeview { //--- Add faction _displayName = _x select 0; _icon = _x select 1; _vehicleClasses = _x select 2; _tvFaction = _ctrlTreeVehicles tvAdd [ [], _displayName ]; _ctrlTreeVehicles tvSetPicture [ [ _tvFaction ], _icon ]; { //--- Add vehicle classes private [ "_displayName", "_vehicles" ]; _displayName = _x select 0; _vehicles = _x select 1; _tvVehicleClass = _ctrlTreeVehicles tvAdd [ [ _tvFaction ], _displayName ]; { //--- Add vehicles private [ "_displayName", "_icon", "_className" ]; _displayName = _x select 0; _icon = _x select 1; _className = _x select 2; _tvVehicle = _ctrlTreeVehicles tvAdd [ [ _tvFaction, _tvVehicleClass ], _displayName ]; _tvVehicle = [ _tvFaction, _tvVehicleClass, _tvVehicle ]; _ctrlTreeVehicles tvSetPicture [ _tvVehicle, _icon ]; _ctrlTreeVehicles tvSetData [ _tvVehicle, _className ]; } forEach _vehicles; _ctrlTreeVehicles tvSort [ [ _tvFaction, _tvVehicleClass ], false ]; } forEach _vehicleClasses; _ctrlTreeVehicles tvSort [ [ _tvFaction ], false ]; _ctrlTreeVehicles tvExpand [ _tvFaction ]; } forEach _list; //--- Update filters visual _delay = if ( NMD_RscDisplayGarage_init ) then { 0.1 } else { 0 }; { _ctrl = _display displayCtrl _x; _color = _forEachIndex call BIS_fnc_sideColor; _alpha = 0.5; _scale = 0.75; if ( _forEachIndex == _curSel ) then { _alpha = 1; _scale = 1; NMD_RscDisplayGarage_filter = _forEachIndex; }; _ctrl ctrlSetActiveColor _color; _color set [ 3, _alpha ]; _ctrl ctrlSetTextColor _color; _pos = [ _ctrl, _scale, _delay ] call BIS_fnc_ctrlSetScale; if ( _forEachIndex == _curSel ) then { _ctrlBackgroundFilter ctrlSetPosition _pos; _ctrlBackgroundFilter ctrlCommit _delay; }; } forEach [ IDC_RSCDISPLAYGARAGE_FILTER2, IDC_RSCDISPLAYGARAGE_FILTER1, IDC_RSCDISPLAYGARAGE_FILTER3, IDC_RSCDISPLAYGARAGE_FILTER4, IDC_RSCDISPLAYGARAGE_FILTER0 ]; //--- Call treeview select EH [ "onVehicleSelChanged", [ _display ] ] call NMD_RscDisplayGarage; //--- Add treeview select EH _ctrlTreeVehicles ctrlAddEventHandler [ "TreeSelChanged", { [ "onVehicleSelChanged", [ ctrlParent ( _this select 0 ) ] ] call NMD_RscDisplayGarage } ]; }; ///////////////////////////////////////////////////////////////////////////////// case "onVehicleSelChanged": { _display = _params select 0; _ctrlTreeVehicles = _display displayCtrl IDC_RSCDISPLAYGARAGE_TREEVEHICLES; _ctrlComboSkin = _display displayCtrl IDC_RSCDISPLAYGARAGE_COMBOSKIN; _ctrlIconVehicle = _display displayCtrl IDC_RSCDISPLAYGARAGE_ICONVEHICLE; _ctrlButtonSpawn = _display displayCtrl IDC_RSCDISPLAYGARAGE_BUTTONSPAWN; _curSel = tvCurSel _ctrlTreeVehicles; _className = _ctrlTreeVehicles tvData _curSel; if ( count _curSel == 3 ) then { //--- Update options [ "updateOptions", [ _display, _className ] ] call NMD_RscDisplayGarage; //--- Enable spawn _ctrlButtonSpawn ctrlEnable true; } else { //--- Disable options _ctrlComboSkin ctrlEnable false; lbClear _ctrlComboSkin; _ctrlButtonSpawn ctrlEnable false; _ctrlIconVehicle ctrlSetText ""; }; }; ///////////////////////////////////////////////////////////////////////////////// case "updateOptions": { _display = _params select 0; _ctrlIconVehicle = _display displayCtrl IDC_RSCDISPLAYGARAGE_ICONVEHICLE; _ctrlComboSkin = _display displayCtrl IDC_RSCDISPLAYGARAGE_COMBOSKIN; _className = _params select 1; _cfg = configFile >> "CfgVehicles" >> _className; //--- Update vehicle icon _icon = ( getText ( _cfg >> "picture" ) ) call BIS_fnc_textureVehicleIcon; _ctrlIconVehicle ctrlSetText _icon; //--- Add skins to combo lbClear _ctrlComboSkin; _ctrlComboSkin lbAdd "<Default>"; _ctrlComboSkin lbSetValue [ 0, -1 ]; _ctrlComboSkin lbSetCurSel 0; //--- Check for skins from NMD_CfgVehicleSkins { private "_cfgSkin"; _cfgSkin = missionConfigFile >> "NMD_CfgVehicleSkins" >> _x; { //--- Add skins to array if ( isClass _cfg ) then { { _skin = _x; _displayName = getText ( _skin >> "displayName" ); _textures = getArray ( _skin >> "textures" ); _lbSkin = _ctrlComboSkin lbAdd _displayName; _ctrlComboSkin lbSetData [ _lbSkin, str _textures ]; } forEach ( "true" configClasses _x ); }; } forEach ( _cfgSkin call BIS_fnc_returnParents ); } forEach ( [ _cfg, true ] call BIS_fnc_returnParents ); //--- Sort skins //lbSortByValue _ctrlComboSkin; //--- Enable/disable skins combo _ctrlComboSkin ctrlEnable ( lbSize _ctrlComboSkin > 1 ); }; ///////////////////////////////////////////////////////////////////////////////// case "spawnVehicle": { _display = _params select 0; _ctrlTreeVehicles = _display displayCtrl IDC_RSCDISPLAYGARAGE_TREEVEHICLES; _ctrlComboSkin = _display displayCtrl IDC_RSCDISPLAYGARAGE_COMBOSKIN; _ctrlCheckMoveIn = _display displayCtrl IDC_RSCDISPLAYGARAGE_CHECKMOVEIN; _curSel = tvCurSel _ctrlTreeVehicles; _curSelSkin = lbCurSel _ctrlComboSkin; _className = _ctrlTreeVehicles tvData _curSel; //--- Calculate spawn position _marker = ""; switch(true) do { case (_className isKindOf "LandVehicle"): {_marker = "LandSpawn"} ; case (_className isKindOf "Helicopter"): {_marker = "HeliSpawn"}; case (_className isKindOf "Plane"): {_marker = "PlaneSpawn"}; case (_className isKindOf "Ship"): {_marker = "ShipSpawn"}; default {_marker = "LandSpawn"}; }; _pos = getMarkerPos _marker; //--- Check for nearby entities {deleteVehicle _x;} forEach nearestObjects [ _pos, [ "LandVehicle", "Helicopter","Plane", "Ship" ], 10 ]; //--- Create vehicle _vehicle = createVehicle [ _className, _pos, [], 0, "CAN_COLLIDE" ]; _vehicle setDir markerDir _marker; //--- Apply vehicle skin if ( ctrlEnabled _ctrlComboSkin && { _curSelSkin > 0 } ) then { //--- Texture data _texture = call compile( _ctrlComboSkin lbData _curSelSkin ); //--- Disable texture randomisation _vehicle setVariable [ "BIS_enableRandomization", false ]; //--- Set vehicle texture { _vehicle setObjectTextureGlobal [ _forEachIndex, _x ] } forEach _texture; }; //--- Create UAV AI if ( getText ( configFile >> "CfgVehicles" >> _className >> "vehicleClass" ) == "Autonomous" ) then { createVehicleCrew _vehicle; }; //--- Move player in vehicle if !( ctrlChecked _ctrlCheckMoveIn ) then { player moveInAny _vehicle; }; //--- Cleanup when killed if ( NMD_ModuleVehicles_garageGC > -1 ) then { _vehicle addEventHandler [ "killed", { //--- Remove vehicle from spawned array NMD_ModuleVehicles_spawned = NMD_ModuleVehicles_spawned - [ _this select 0 ]; //--- Cleanup unit with delay preference [ _this select 0, NMD_ModuleVehicles_garageGC ] call NMD_fnc_cleanupUnit; } ]; }; //--- Add vehicle to spawned array NMD_ModuleVehicles_spawned pushBack _vehicle; //--- Close display closeDialog 1; }; }; Sorry for the large amount of text, but I have 3 problems I need help with, most important at the top: The GUI has 5 tabs, 1 for each side (And one for "all") and within these tabs are tree menus which have Faction>Vehicle Type>Vehicle. My problem is that the FIA faction is included in all of the tabs for some reason. Not urgent, but annoying The "Spawn in Vehicle" button is inexplicably blue When you open the GUI for the first time, an error appears, saying "No entry description.ext/NMD_RscDisplayGarage/Controls/Filter0.colorDisabled" Picture of some of the problems: http://i.imgur.com/ZC0tC9p.png Any help is appreciated, thanks
  7. Thanks, fixed it now. The blue "Spawn in" button is still weird though
  8. Is there an easy way to do that?
  9. _display = _params select 0; _ctrlTreeVehicles = _display displayCtrl IDC_RSCDISPLAYGARAGE_TREEVEHICLES; _ctrlComboSkin = _display displayCtrl IDC_RSCDISPLAYGARAGE_COMBOSKIN; _ctrlCheckMoveIn = _display displayCtrl IDC_RSCDISPLAYGARAGE_CHECKMOVEIN; _curSel = tvCurSel _ctrlTreeVehicles; _curSelSkin = lbCurSel _ctrlComboSkin; _className = _ctrlTreeVehicles tvData _curSel; //--- Calculate spawn position switch(true) do { case (_className isKindOf "LandVehicle"): {_marker = "LandSpawn"} ; case (_className isKindOf "Helicopter"): {_marker = "HeliSpawn"}; case (_className isKindOf "Plane"): {_marker = "PlaneSpawn"}; case (_className isKindOf "Ship"): {_marker = "ShipSpawn"}; default {_marker = "LandSpawn"}; }; _marker = "GroundSpawn"; //<-- Whoops, ignore this, left over from testing _pos = getMarkerPos _marker; //--- Check for nearby entities {deleteVehicle _x;} forEach nearestObjects [ _pos, [ "LandVehicle", "Helicopter","Plane", "Ship" ], 10 ]; //--- Create vehicle _vehicle = createVehicle [ _className, _pos, [], 0, "CAN_COLLIDE" ]; _vehicle setDir markerDir _marker; Here's the offending part of the code. When I run it, I get the error in the title. Interesting to note: Removing the whole switch(true) do part and manually setting _marker to something makes it work fine, but then I cant choose the marker based on vehicle type If I replace the "_pos" in nearestObjects and createVehicle with what _pos directly is (getMarkerPos <MarkerName>) makes it work fine, but then I cant choose the marker based on vehicle type Please help, its 6 am and ive been trying to fix for hours. Havent slept yet
  10. Yeah, ive been using Python a lot before this so theres a few tiny things I always forget... such as those damn semicolons
  11. I've been pulling my hair out for the past 8 hours and it was that simple... Thanks guys, I appreciate it I still have a problem or two that are related to this script but ill make a seperate post for those
  12. Makes sense, how can I fix this?
  13. Yep, all the markers are there. Are there any alternate ways to achieve what im trying to do? I just want to see what type of vehicle is chosen and then spawn it at the marker that corresponds to the class of vehicle
  14. It just prints the word "array"
  15. I should have mentioned that. {deleteVehicle _x;} forEach nearestObjects [ _pos, [ "LandVehicle", "Helicopter","Plane", "Ship" ], 10 ]; But specifically the nearestObjects part. If i omit that line then createVehicle on the next line throws the same error
  16. My mistake, thats just there from me testing, I forgot to remove it. Regularly, that wouldnt be there and I would get the aforementioned error
×