CSI2STAR Military Map Sectors

  1. 7 years ago

    I was trying to find something similar in the function viewer but I came up a bit short. Is there a way that I could so to speak query a sector of the map and see if an AI commander has units active in that area while they are virtualized? I don't need to know the exact positions or details of the units, just simply if they're active in a given sector.

  2. Edited 7 years ago by Bryan

    I'm running some local tests using getNearProfiles:

    EDIT: stumbled upon a snippet on the wiki: http://alivemod.com/wiki/index.php/Script_Snippets

    EDIT2: I tried using 'entity', or following the example as such:

    ((count ([getposATL thisTrigger, 50, ["WEST","entity"]] call ALIVE_fnc_getNearProfiles)) > 0);

    But it's only returning an empty array.

    -image-

    prs = [getPos player, 500, ["WEST","vehicle"]] call ALIVE_fnc_getNearProfiles; 
    diag_log prs;
    [
    	[
    		"#CBA_HASH#",
    		[
    			"debug",
    			"active",
    			"position",
    			"side",
    			"profileID",
    			"type",
    			"objectType",
    			"vehicleAssignments",
    			"entitiesInCommandOf",
    			"entitiesInCargoOf",
    			"vehicle",
    			"vehicleClass",
    			"direction",
    			"fuel",
    			"ammo",
    			"engineOn",
    			"damage",
    			"canMove",
    			"canFire",
    			"needReload",
    			"despawnPosition",
    			"hasSimulated",
    			"spawnType",
    			"faction",
    			"_rev",
    			"_id",
    			"busy",
    			"cargo",
    			"slingload",
    			"slung",
    			"debugMarkers",
    			"locked"
    		],
    		[
    			true,
    			true,
    			[3613.4,8560.11,0.0459595],
    			"WEST",
    			"BLU_F-vehicle_14",
    			"vehicle",
    			"Car",
    			[
    				"#CBA_HASH#",
    				["BLU_F-entity_8"],
    				[
    					[
    						"BLU_F-vehicle_14",
    						"BLU_F-entity_8",
    						[
    							[0],
    							[],
    							[],
    							[],
    							[1,2,3],
    							[]
    						]
    					]
    				],
    				any
    			],
    			["BLU_F-entity_8"],
    			[],
    			vehicle_17,
    			"B_MRAP_01_F",
    			0,
    			1,
    			[],
    			false,
    			[],
    			true,
    			true,
    			0,
    			[0,0],
    			false,
    			[],
    			"BLU_F",
    			"",
    			"",
    			false,
    			[],
    			[],
    			[],
    			["ALiVE_PROFILEVEHICLE_BLU_F-vehicle_14"],
    			true
    		],
    		any
    	]
    ]

    Is it listed anywhere though which categories I can use? I tried using just WEST alone but it returns nothing.