Jump to content

o5_

Member
  • Content Count

    44
  • Joined

  • Last visited

  • Medals

Everything posted by o5_

  1. Gentlemen, greetings again. I created a display control to mimic a MFD screen with a map/nav page with the following code... with uiNamespace do { disableSerialization; TGPMFD = findDisplay 46 ctrlCreate ["RscPicture", 89978]; TGPMFD ctrlSetPosition [ 0.69 * safezoneW + safezoneX, 0.578 * safezoneH + safezoneY, 0.31 * safezoneW, 0.415 * safezoneH ]; TGPMFD ctrlSetText "ACC4I\mfd.paa"; TGPNav = findDisplay 46 ctrlCreate ["RscMapControl", 89980]; TGPNav ctrlSetPosition [ 0.7205 * safezoneW + safezoneX, 0.619 * safezoneH + safezoneY, 0.2475 * safezoneW, 0.33 * safezoneH ]; }; I have it updating properly but I'll use this picture to describe the issue... . any ideas how I can fix this. I think I have to center the map on the center of the control.?.? Thank you!
  2. Thanks man. I look into using config classes.
  3. If I spawn a random group not knowing how many vehicles are in it or how many dismounted soldiers it has in it (assuming there are both), what's the easiest way (code) to mount all dismounted soldiers in vacant vehicles positions? Thanks for the help guys. Sent from my SM-G930F using Tapatalk
  4. Amazing, just what I was looking for! Thanks!
  5. Hey George, thanks. I'm on my mobile and I'm having a hard time viewing the content in the link you sent. Is there a particular part that would benefit me? Again, thanks man. Sent from my SM-G930F using Tapatalk
  6. I suggest leaving out the postInits in functions. Cfg so I, as a mission maker, have the flexibility to add enable/disable in mission parameters. Thanks@genesis92x and@Freddo3000. Love vcom Sent from my SM-G930F using Tapatalk
  7. Is there a way to distinguish how a target is detected? I want to list targets picked up by my aircraft sensors exclusively, not just some vehicle detected visually. For example we can list tracks tracks sent over the datalink with listremotetargets. Anything similar for local targets? Or a workaround? Thanks. Sent from my SM-G930F using Tapatalk
  8. Thanks for the reply grumpy Sent from my SM-G930F using Tapatalk
  9. so I spend a lot of time playing arma by myself so this is something that I would enjoy. whats the best way to control the main gun as the pilot? I'll include a few ideas I had and hopefully someone can provide some insight towards a better solution. #1. private _laser = ("LaserTargetW" createVehicleLocal [0,0,0]); private _gunner = ((group player) createUnit ["B_soldier_F", [0,0,0], [], 0, "NONE"]); missionNamespace setVariable ["LASE", _laser]; missionNamespace setVariable ["GUN", _gunner]; _gunner moveInAny (vehicle player); hideObject _gunner; _gunner setSpeaker "NoVoice"; _gunner setSkill 1; _gunner disableAI "TARGET"; _gunner disableAI "AUTOTARGET"; _gunner disableAI "AUTOCOMBAT"; _gunner disableAI "FSM"; (group player) setBehaviour "COMBAT"; (group player) setCombatMode "BLUE"; [_laser,_gunner] spawn { _laser = (_this param [0]); _gunner = (_this param [1]); waitUntil { _laser setPos (AGLtoASL (screenToWorld [.5,.5])); //_gunner reveal _laser; //_gunner doTarget _laser; (not (missionNamespace getVariable "laserOn")) }; }; _gunner commandTarget _laser; or use an actual laser 2. animateSource: AH99 animateSource ["MainTurret", -rad 90]; AH99 animateSource ["MainGun", rad 30]; what do you guys think? are there better ideas or methods? thanks.
  10. So as the title states I'm curious what you all think about efficiency/optimizations when it comes to writing a lengthy script/mod for a mission. My current scripted mod is AC-C4I (Air Craft Command, Contol, Computers, Communications, & Intelligence). It has to do with sensors and targeting. The scripts have a lot of "waitUntil" commands for locking the targeting camera to screenToWorld amongst other functions. What would be the most efficient way to write this/integrate it into a mission. I can write the whole thing in one file and "call compile preprocessFileLineNumbers" on init. I can create a CfgFunctions.hpp and add it to the description.ext, or I could make it an FSM. I'd love to hear from you guys. Thanks.
  11. Thanks for the reply. I'll certainly consider your recommendations and see what I can do. Sent from my SM-G930F using Tapatalk
  12. if I had the darter I could lock the camera simply by doing- _uav lockCameraTo [(screenToworld [0.5,0.5]), [0]]; and if I wanted to show an on screen PIP of the uav feed I create a camera object and place it like this- _cam attachTo [_uav, [0,0,0], "PiP0_pos"]; how can I do both of these for the pilotCamera found on planes in the new jets DLC? Thanks guys. -o5
  13. how do I reference (through scripting) targets that have already been identified and tracked by the new sensors active radar? Sent from my SM-G930F using Tapatalk
  14. it is. thank you so much! Sent from my SM-G930F using Tapatalk
  15. are there new commands with the jets dlc sensors? I'm trying to find a way to retrieve/reference targets that my vehicles radar has already identified. thanks ahead of time. Sent from my SM-G930F using Tapatalk
  16. Here is what I currently use.... Init.sqf: if ((not (hasInterface)) and (not (isDedicated))) then { [] spawn { waitUntil {!isNull player}; HC_init = (vehicle player); publicVariableServer "HC_init"; }; }; initServer.sqf: missionNamespace setVariable ["HCs",[]]; "HC_init" addPublicVariableEventHandler { _hc_name = (_this select 1); _hc_id = (owner _hc_name); _hcs = (missionNamespace getVariable "HCs"); _hcs set [(count _hcs), [_hc_name,_hc_id]]; missionNamespace setVariable ["HCs",_hcs]; }; as the title says, is there a more efficient way to accomplish this? Thanks.
  17. I know its late but I appreciate the help! I see you on the forums frequently @grumpyoldman, can you help me with my most recent question/post? its regarding registering headless clients to an array as they initialize or join.
  18. As the title states Im trying to get a 3d vector from an azimuth. like if my unit was facing north I could do... _azimuth = (getDir player); _vector = ([_azimuth] call fnc_azimuth_to_vector); and _vector would be [0,1,0]... Thanks. PS. I'm aware of vectorDir. I want a function to return the vector based on an azimuth or number, not object.
  19. The other way I was using was... { if (_x isKindOf VRENTITYCLASSNAME) then { ... }; } forEach allEntities; the only issue with this is with AI enabled if on of the virtual entities is controlled by AI and not a player (or PC) it will still show up in the list and break scripts
  20. Yes they are. And I like to make my missions with AI enabled so my scripts don't fail when looking for variables (entities). With that said I wait for the player or headless client to initialize to avoid errors.
  21. Any luck with this? I'm trying to do the same thing and I've tried syncing a side logic to the SectorTactic then syncing my spawned units to the side logic, syncing directly to the SectorTactic and to the spawnAI module. Its a great idea though. EDIT: I found this in the functions viewer... private["_module"]; _module = _this param [0,objNull,[objNull]]; /*-------------------------------------------------------------------------------------------------- RUN ONCE --------------------------------------------------------------------------------------------------*/ private["_initialized"]; _initialized = missionNamespace getVariable ["bis_fnc_moduleSpawnAISectorTactic_initialized",false]; //make sure the module script runs only once if (_initialized) exitWith {}; missionNamespace setVariable ["bis_fnc_moduleSpawnAISectorTactic_initialized",true]; /*-------------------------------------------------------------------------------------------------- LOAD FUNCTIONS --------------------------------------------------------------------------------------------------*/ _path = "\A3\Modules_F_Heli\Misc\Functions\ModuleSpawnAISectorTactic\"; [ _path, "bis_fnc_moduleSpawnAISectorTactic_", [ "enableAI", "disableAI", "startFSM", "initGroup", "copyGroup", "getNearTransportVehicle", "getGrpAvgMagazines", "execWidgetFSM", "deployLocValid", "getGroupIdVar", "resetEventHandlerFlags", "adjustGear", "widgetInit", "widgetUpdate", "isVehicleArmed", "getVehicleWeapons", "vehicleHit", "splitGroup", "unstuck", "getClosestSector", "main" ] ] call bis_fnc_loadFunctions; /*-------------------------------------------------------------------------------------------------- INITIALIZE EMITTERS --------------------------------------------------------------------------------------------------*/ private["_affectedEmitters","_allEmitters"]; _affectedEmitters = [_module,["ModuleSpawnAI_F"]] call bis_fnc_synchronizedObjects; _allEmitters = allMissionObjects "ModuleSpawnAI_F"; if (count _affectedEmitters == 0) then { _affectedEmitters =+ _allEmitters; }; { if (_x in _affectedEmitters) then { _x setVariable ["useSectorTactic",true]; } else { _x setVariable ["useSectorTactic",false]; }; } forEach _allEmitters; /*-------------------------------------------------------------------------------------------------- INITIALIZE SECTORS & AREAS & TRIGGERS --------------------------------------------------------------------------------------------------*/ private["_fn_onSectorCaptured"]; bis_fnc_moduleSpawnAISectorTactic_areas = []; bis_fnc_moduleSpawnAISectorTactic_sectors = [true] call bis_fnc_moduleSector; bis_fnc_moduleSpawnAISectorTactic_sectorsWest = []; bis_fnc_moduleSpawnAISectorTactic_sectorsEast = []; bis_fnc_moduleSpawnAISectorTactic_sectorsGuer = []; bis_fnc_moduleSpawnAISectorTactic_sectorsNonWest = []; bis_fnc_moduleSpawnAISectorTactic_sectorsNonEast = []; bis_fnc_moduleSpawnAISectorTactic_sectorsNonGuer = []; bis_fnc_moduleSpawnAISectorTactic_sectorsUnknown = []; _fn_onSectorCaptured = { private["_sector","_capper","_looser"]; _sector = _this param [0,objNull,[objNull]]; _capper = _this param [1,west,[west]]; _looser = _this param [2,west,[west]]; _capperSectors = missionNamespace getVariable [format["bis_fnc_moduleSpawnAISectorTactic_sectors%1",_capper],[]]; _looserSectors = missionNamespace getVariable [format["bis_fnc_moduleSpawnAISectorTactic_sectors%1",_looser],[]]; _capperSectors = _capperSectors + [_sector]; _looserSectors = _looserSectors - [_sector]; missionNamespace setVariable [format["bis_fnc_moduleSpawnAISectorTactic_sectors%1",_capper],_capperSectors]; missionNamespace setVariable [format["bis_fnc_moduleSpawnAISectorTactic_sectors%1",_looser],_looserSectors]; bis_fnc_moduleSpawnAISectorTactic_sectorsNonWest = bis_fnc_moduleSpawnAISectorTactic_sectors - bis_fnc_moduleSpawnAISectorTactic_sectorsWest; bis_fnc_moduleSpawnAISectorTactic_sectorsNonEast = bis_fnc_moduleSpawnAISectorTactic_sectors - bis_fnc_moduleSpawnAISectorTactic_sectorsEast; bis_fnc_moduleSpawnAISectorTactic_sectorsNonGuer = bis_fnc_moduleSpawnAISectorTactic_sectors - bis_fnc_moduleSpawnAISectorTactic_sectorsGuer; }; private["_area","_sector"]; { if (true) then { _sector = _x; //setup event handler for tracking changes of the sector ownership [_sector,"ownerChanged",_fn_onSectorCaptured] call bis_fnc_addScriptedEventHandler; //get area synced with the sector _area = [_sector, "LocationArea_F", true] call bis_fnc_synchronizedObjects; if (count _area == 0) exitWith { ["[x] No valid area is linked to the sector %1!", _sector] call bis_fnc_error; }; if (count _area > 1) exitWith { ["[x] More then 1 area is linked to the sector %1!", _sector] call bis_fnc_error; }; _area = _area select 0; _sector setVariable ["area",_area]; _sector setVariable ["position",getPos _area]; _area setVariable ["sector",_sector]; bis_fnc_moduleSpawnAISectorTactic_areas set [count bis_fnc_moduleSpawnAISectorTactic_areas, _area]; }; } forEach bis_fnc_moduleSpawnAISectorTactic_sectors; //initialize gvars with sector owners private["_sector","_owner","_sectors"]; { _sector = _x; _owner = _sector getVariable ["owner","Unknown"]; _sectors = missionNamespace getVariable format["bis_fnc_moduleSpawnAISectorTactic_sectors%1",_owner]; _sectors set [count _sectors, _sector]; } forEach bis_fnc_moduleSpawnAISectorTactic_sectors; bis_fnc_moduleSpawnAISectorTactic_sectorsNonWest = bis_fnc_moduleSpawnAISectorTactic_sectors - bis_fnc_moduleSpawnAISectorTactic_sectorsWest; bis_fnc_moduleSpawnAISectorTactic_sectorsNonEast = bis_fnc_moduleSpawnAISectorTactic_sectors - bis_fnc_moduleSpawnAISectorTactic_sectorsEast; bis_fnc_moduleSpawnAISectorTactic_sectorsNonGuer = bis_fnc_moduleSpawnAISectorTactic_sectors - bis_fnc_moduleSpawnAISectorTactic_sectorsGuer; private["_area","_triggers"]; //get all triggeres and store them in areas and sectors { _area = _x; _triggers = [_area,"EmptyDetector"] call bis_fnc_synchronizedObjects; _area setVariable ["triggers",_triggers]; (_area getVariable "sector") setVariable ["triggers",_triggers]; } forEach bis_fnc_moduleSpawnAISectorTactic_areas; /*-------------------------------------------------------------------------------------------------- START THE GROUP MONITOR --------------------------------------------------------------------------------------------------*/ [] spawn bis_fnc_moduleSpawnAISectorTactic_main; anyone know how to do what LT.DANG is asking based on the code above? Thanks.
  22. o5_

    [SP/MP] BeCTI

    How does becti handle headless clients? And does it have any performance tweaks like caching or dynamic simulation? Would headless clients work on becti? Thanks guys. Sent from my SM-G930F using Tapatalk
  23. Disregard I understand. Thanks Sent from my SM-G930F using Tapatalk
  24. Right, I'm tracking that much. Is there a seperate executable for the profiling vs performance when I subscribe through steam? Thanks. Sent from my SM-G930F using Tapatalk
  25. Yea on db. But when I subscribe to the steam branch there's only the profiling. (Thanks for the reply) Sent from my SM-G930F using Tapatalk
×