panther42
-
Content Count
774 -
Joined
-
Last visited
-
Medals
Posts posted by panther42
-
-
As the title eludes to, I finally decided to mess around with the communication menu after all these years.
I was playing SOG PF in the editor with @pierremgi 's MGI Advanced Modules, found here or here, using Spawn Groups Attack modules and having one heck of a time defending an SF base in Khe Sanh. I had a hard set editor placed defending contingent.
I was not using any AI revive and it got to the point the enemy was within the base compound. Thought to my self, I could have used some reinforcements.
In the same mission, I use BIS support modules, and unfortunately, none are reinforce.
So, I decided to delve into the communication menu and make my own reinforcement communication menu.
The following is what came out of it (does not include the description.ext part):
Spoilersubmenu = "#USER:MENU_REINFORCE_1"; MENU_REINFORCE_1 = [ // First array: "User menu" This will be displayed under the menu, bool value: has Input Focus or not. // Note that as of version Arma 3 1.05, if the bool value is set to false, Custom Icons will not be displayed. ["Request Reinforcements", false], // Syntax and semantics for following array elements: // ["Title_in_menu", [assigned_key], "Submenu_name", CMD, "expression",script-string, "isVisible", "isActive" (, optional icon path)] // Title_in_menu: string that will be displayed for the player // Assigned_key: 0 - no key, 1 - escape key, 2 - key-1, 3 - key-2, ... , 10 - key-9, 11 - key-0, 12 and up... the whole keyboard // Submenu_name: User menu name string (eg "#USER:MY_SUBMENU_NAME" ), "" for script to execute. // CMD: (for main menu:) CMD_SEPARATOR -1; CMD_NOTHING -2; CMD_HIDE_MENU -3; CMD_BACK -4; (for custom menu:) CMD_EXECUTE -5 // script-string: command to be executed on activation. (_target=CursorTarget,_pos=CursorPos) // isVisible - Boolean 1 or 0 for yes or no, - or optional argument string, eg: "CursorOnGround" // isActive - Boolean 1 or 0 for yes or no - if item is not active, it appears gray. // optional icon path: The path to the texture of the cursor, that should be used on this menuitem. ["Reinforce land", [2], "#USER:MENU_REINFORCE_2", -5, [], "1", "1"], ["Reinforce paradrop", [3], "#USER:MENU_REINFORCE_3", -5, [], "1", "1"] ]; //heli insertion land MENU_REINFORCE_2 = [ ["Branch", false], ["US Army", [2], "#USER:MENU_REINFORCE_2_1", -5, [], "1", "1"], ["SF", [3], "#USER:MENU_REINFORCE_2_2", -5, [], "1", "1"], ["LRRP", [4], "#USER:MENU_REINFORCE_2_3", -5, [], "1", "1"], ["MACV", [5], "#USER:MENU_REINFORCE_2_4", -5, [], "1", "1"], ["USN Advisory Det", [6], "#USER:MENU_REINFORCE_2_5", -5, [], "1", "1"], ["USN SEAL Det Bravo", [7], "#USER:MENU_REINFORCE_2_6", -5, [], "1", "1"], ["USN SEAL", [8], "#USER:MENU_REINFORCE_2_7", -5, [], "1", "1"], ["USMC", [9], "#USER:MENU_REINFORCE_2_8", -5, [], "1", "1"], ["USMC Force Recon", [10], "#USER:MENU_REINFORCE_2_9", -5, [], "1", "1"] ]; MENU_REINFORCE_2_1 = [ ["US Army", false], ["Rifle Platoon (1st)", [2], "", -5, [["expression", "[_pos,'vn_b_group_men_army','Rifle Platoon (1st)'] execVM 'core\scripts\p42_reinf_land.sqf';"]], "CursorOnGround", "1","\A3\ui_f\data\IGUI\Cfg\Cursors\iconcursorsupport_ca.paa"], ["Rifle Squad (1st)", [3], "", -5, [["expression", "[_pos,'vn_b_group_men_army','Rifle Squad (1st)'] execVM 'core\scripts\p42_reinf_land.sqf';"]], "CursorOnGround", "1","\A3\ui_f\data\IGUI\Cfg\Cursors\iconcursorsupport_ca.paa"], ["Rifle Squad (2nd)", [4], "", -5, [["expression", "[_pos,'vn_b_group_men_army','Rifle Squad (2nd)'] execVM 'core\scripts\p42_reinf_land.sqf';"]], "CursorOnGround", "1","\A3\ui_f\data\IGUI\Cfg\Cursors\iconcursorsupport_ca.paa"] ]; MENU_REINFORCE_2_2 = [ ["Special Forces", false], ["B-52 Team", [2], "", -5, [["expression", "[_pos,'vn_b_group_men_sf','B-52 Team'] execVM 'core\scripts\p42_reinf_land.sqf';"]], "CursorOnGround", "1","\A3\ui_f\data\IGUI\Cfg\Cursors\iconcursorsupport_ca.paa"], ["B-53 Team", [3], "", -5, [["expression", "[_pos,'vn_b_group_men_sf','B-53 Team'] execVM 'core\scripts\p42_reinf_land.sqf';"]], "CursorOnGround", "1","\A3\ui_f\data\IGUI\Cfg\Cursors\iconcursorsupport_ca.paa"], ["Mike Force", [4], "", -5, [["expression", "[_pos,'vn_b_group_men_sf','Mike Force'] execVM 'core\scripts\p42_reinf_land.sqf';"]], "CursorOnGround", "1","\A3\ui_f\data\IGUI\Cfg\Cursors\iconcursorsupport_ca.paa"], ["Roadrunner Team", [5], "", -5, [["expression", "[_pos,'vn_b_group_men_sf','Roadrunner Team'] execVM 'core\scripts\p42_reinf_land.sqf';"]], "CursorOnGround", "1","\A3\ui_f\data\IGUI\Cfg\Cursors\iconcursorsupport_ca.paa"] ]; MENU_REINFORCE_2_3 = [ ["Long Range Recon Patrol", false], ["LRRP Recon Team", [2], "", -5, [["expression", "[_pos,'vn_b_group_men_lrrp','LRRP Recon Team'] execVM 'core\scripts\p42_reinf_land.sqf';"]], "CursorOnGround", "1","\A3\ui_f\data\IGUI\Cfg\Cursors\iconcursorsupport_ca.paa"] ]; MENU_REINFORCE_2_4 = [ ["MACV SOG", false], ["Hatchet Force", [2], "", -5, [["expression", "[_pos,'vn_b_group_men_sog','Hatchet Force'] execVM 'core\scripts\p42_reinf_land.sqf';"]], "CursorOnGround", "1","\A3\ui_f\data\IGUI\Cfg\Cursors\iconcursorsupport_ca.paa"], ["Recon Team Columbia", [3], "", -5, [["expression", "[_pos,'vn_b_group_men_sog','Recon Team Columbia'] execVM 'core\scripts\p42_reinf_land.sqf';"]], "CursorOnGround", "1","\A3\ui_f\data\IGUI\Cfg\Cursors\iconcursorsupport_ca.paa"], ["Recon Team Raleigh", [4], "", -5, [["expression", "[_pos,'vn_b_group_men_sog','Recon Team Raleigh'] execVM 'core\scripts\p42_reinf_land.sqf';"]], "CursorOnGround", "1","\A3\ui_f\data\IGUI\Cfg\Cursors\iconcursorsupport_ca.paa"] ]; MENU_REINFORCE_2_5 = [ ["US Naval Advisory Detachment", false], ["Strike Force", [2], "", -5, [["expression", "[_pos,'vn_b_group_men_seal_nad','Strike Force'] execVM 'core\scripts\p42_reinf_land.sqf';"]], "CursorOnGround", "1","\A3\ui_f\data\IGUI\Cfg\Cursors\iconcursorsupport_ca.paa"], ["Strike Team", [3], "", -5, [["expression", "[_pos,'vn_b_group_men_seal_nad','Strike Team'] execVM 'core\scripts\p42_reinf_land.sqf';"]], "CursorOnGround", "1","\A3\ui_f\data\IGUI\Cfg\Cursors\iconcursorsupport_ca.paa"] ]; MENU_REINFORCE_2_6 = [ ["US Navy SEAL Det Bravo", false], ["Strike Force", [2], "", -5, [["expression", "[_pos,'vn_b_group_men_seal_db','Strike Force'] execVM 'core\scripts\p42_reinf_land.sqf';"]], "CursorOnGround", "1","\A3\ui_f\data\IGUI\Cfg\Cursors\iconcursorsupport_ca.paa"] ]; MENU_REINFORCE_2_7 = [ ["US Navy SEAL", false], ["SEAL Platoon 1", [2], "", -5, [["expression", "[_pos,'vn_b_group_men_seal','SEAL Platoon 1'] execVM 'core\scripts\p42_reinf_land.sqf';"]], "CursorOnGround", "1","\A3\ui_f\data\IGUI\Cfg\Cursors\iconcursorsupport_ca.paa"], ["SEAL Platoon 2", [3], "", -5, [["expression", "[_pos,'vn_b_group_men_seal','SEAL Platoon 2'] execVM 'core\scripts\p42_reinf_land.sqf';"]], "CursorOnGround", "1","\A3\ui_f\data\IGUI\Cfg\Cursors\iconcursorsupport_ca.paa"], ["SEAL Platoon 3", [4], "", -5, [["expression", "[_pos,'vn_b_group_men_seal','SEAL Platoon 3'] execVM 'core\scripts\p42_reinf_land.sqf';"]], "CursorOnGround", "1","\A3\ui_f\data\IGUI\Cfg\Cursors\iconcursorsupport_ca.paa"] ]; MENU_REINFORCE_2_8 = [ ["USMC", false], ["USMC 66 Rifle Squad", [2], "", -5, [["expression", "[_pos,'vn_b_group_men_usmc_66','Rifle Squad'] execVM 'core\scripts\p42_reinf_land.sqf';"]], "CursorOnGround", "1","\A3\ui_f\data\IGUI\Cfg\Cursors\iconcursorsupport_ca.paa"], ["USMC 66 Weapons Squad", [3], "", -5, [["expression", "[_pos,'vn_b_group_men_usmc_66','Weapons Squad'] execVM 'core\scripts\p42_reinf_land.sqf';"]], "CursorOnGround", "1","\A3\ui_f\data\IGUI\Cfg\Cursors\iconcursorsupport_ca.paa"], ["USMC 68 Rifle Squad", [4], "", -5, [["expression", "[_pos,'vn_b_group_men_usmc_68','Rifle Squad'] execVM 'core\scripts\p42_reinf_land.sqf';"]], "CursorOnGround", "1","\A3\ui_f\data\IGUI\Cfg\Cursors\iconcursorsupport_ca.paa"], ["USMC 68 Weapons Squad", [5], "", -5, [["expression", "[_pos,'vn_b_group_men_usmc_68','Weapons Squad'] execVM 'core\scripts\p42_reinf_land.sqf';"]], "CursorOnGround", "1","\A3\ui_f\data\IGUI\Cfg\Cursors\iconcursorsupport_ca.paa"], ["USMC 70 Rifle Squad", [6], "", -5, [["expression", "[_pos,'vn_b_group_men_usmc_70','Rifle Squad'] execVM 'core\scripts\p42_reinf_land.sqf';"]], "CursorOnGround", "1","\A3\ui_f\data\IGUI\Cfg\Cursors\iconcursorsupport_ca.paa"], ["USMC 70 Weapons Squad", [7], "", -5, [["expression", "[_pos,'vn_b_group_men_usmc_70','Weapons Squad'] execVM 'core\scripts\p42_reinf_land.sqf';"]], "CursorOnGround", "1","\A3\ui_f\data\IGUI\Cfg\Cursors\iconcursorsupport_ca.paa"] ]; MENU_REINFORCE_2_9 = [ ["USMC Force Recon", false], ["Force Recon Team 66", [2], "", -5, [["expression", "[_pos,'vn_b_group_men_usmc_recon_66','Recon Team'] execVM 'core\scripts\p42_reinf_land.sqf';"]], "CursorOnGround", "1","\A3\ui_f\data\IGUI\Cfg\Cursors\iconcursorsupport_ca.paa"], ["Force Recon Team 68", [3], "", -5, [["expression", "[_pos,'vn_b_group_men_usmc_recon_68','Recon Team'] execVM 'core\scripts\p42_reinf_land.sqf';"]], "CursorOnGround", "1","\A3\ui_f\data\IGUI\Cfg\Cursors\iconcursorsupport_ca.paa"], ["Force Recon Team 70", [4], "", -5, [["expression", "[_pos,'vn_b_group_men_usmc_recon_70','Recon Team'] execVM 'core\scripts\p42_reinf_land.sqf';"]], "CursorOnGround", "1","\A3\ui_f\data\IGUI\Cfg\Cursors\iconcursorsupport_ca.paa"] ]; //https://coffeeordie.com/multiple-combat-jumps-vietnam //paradrop MENU_REINFORCE_3 = [ ["Branch", false], ["SF", [2], "#USER:MENU_REINFORCE_3_1", -5, [], "1", "1"], ["LRRP", [3], "#USER:MENU_REINFORCE_3_2", -5, [], "1", "1"], ["MACV", [4], "#USER:MENU_REINFORCE_3_3", -5, [], "1", "1"], ["USMC Force Recon", [5], "#USER:MENU_REINFORCE_3_4", -5, [], "1", "1"] ]; MENU_REINFORCE_3_1 = [ ["Special Forces", false], ["B-52 Team", [2], "", -5, [["expression", "[_pos,'vn_b_group_men_sf','B-52 Team'] execVM 'core\scripts\p42_reinf_para.sqf';"]], "CursorOnGround", "1","\A3\ui_f\data\IGUI\Cfg\Cursors\iconcursorsupport_ca.paa"], ["B-53 Team", [3], "", -5, [["expression", "[_pos,'vn_b_group_men_sf','B-53 Team'] execVM 'core\scripts\p42_reinf_para.sqf';"]], "CursorOnGround", "1","\A3\ui_f\data\IGUI\Cfg\Cursors\iconcursorsupport_ca.paa"], ["Mike Force", [4], "", -5, [["expression", "[_pos,'vn_b_group_men_sf','Mike Force'] execVM 'core\scripts\p42_reinf_para.sqf';"]], "CursorOnGround", "1","\A3\ui_f\data\IGUI\Cfg\Cursors\iconcursorsupport_ca.paa"], ["Roadrunner Team", [5], "", -5, [["expression", "[_pos,'vn_b_group_men_sf','Roadrunner Team'] execVM 'core\scripts\p42_reinf_para.sqf';"]], "CursorOnGround", "1","\A3\ui_f\data\IGUI\Cfg\Cursors\iconcursorsupport_ca.paa"] ]; MENU_REINFORCE_3_2 = [ ["Long Range Recon Patrol", false], ["LRRP Recon Team", [2], "", -5, [["expression", "[_pos,'vn_b_group_men_lrrp','LRRP Recon Team'] execVM 'core\scripts\p42_reinf_para.sqf';"]], "CursorOnGround", "1","\A3\ui_f\data\IGUI\Cfg\Cursors\iconcursorsupport_ca.paa"] ]; MENU_REINFORCE_3_3 = [ ["MACV SOG", false], ["Hatchet Force", [2], "", -5, [["expression", "[_pos,'vn_b_group_men_sog','Hatchet Force'] execVM 'core\scripts\p42_reinf_para.sqf';"]], "CursorOnGround", "1","\A3\ui_f\data\IGUI\Cfg\Cursors\iconcursorsupport_ca.paa"], ["Recon Team Columbia", [3], "", -5, [["expression", "[_pos,'vn_b_group_men_sog','Recon Team Columbia'] execVM 'core\scripts\p42_reinf_para.sqf';"]], "CursorOnGround", "1","\A3\ui_f\data\IGUI\Cfg\Cursors\iconcursorsupport_ca.paa"], ["Recon Team Raleigh", [4], "", -5, [["expression", "[_pos,'vn_b_group_men_sog','Recon Team Raleigh'] execVM 'core\scripts\p42_reinf_para.sqf';"]], "CursorOnGround", "1","\A3\ui_f\data\IGUI\Cfg\Cursors\iconcursorsupport_ca.paa"] ]; MENU_REINFORCE_3_4 = [ ["USMC Force Recon", false], ["Force Recon Team 66", [2], "", -5, [["expression", "[_pos,'vn_b_group_men_usmc_recon_66','Recon Team'] execVM 'core\scripts\p42_reinf_para.sqf';"]], "CursorOnGround", "1","\A3\ui_f\data\IGUI\Cfg\Cursors\iconcursorsupport_ca.paa"], ["Force Recon Team 68", [3], "", -5, [["expression", "[_pos,'vn_b_group_men_usmc_recon_68','Recon Team'] execVM 'core\scripts\p42_reinf_para.sqf';"]], "CursorOnGround", "1","\A3\ui_f\data\IGUI\Cfg\Cursors\iconcursorsupport_ca.paa"], ["Force Recon Team 70", [4], "", -5, [["expression", "[_pos,'vn_b_group_men_usmc_recon_70','Recon Team'] execVM 'core\scripts\p42_reinf_para.sqf';"]], "CursorOnGround", "1","\A3\ui_f\data\IGUI\Cfg\Cursors\iconcursorsupport_ca.paa"] ]; private _callReinf = [player,"Reinforce"] call BIS_fnc_addCommMenuItem;
Now this works fine with all the other scripts I have made for reinforcements via helicopter insertion landing and paradrop within the mission.
Problem is, it's pretty much hard coded for West and SOG PF.
My question to any familiar with the communication menu is if there is a better way to have multiple submenus like above, but without all the hard coding?
I've looked at almost all forum topics regarding the communication menu, and they just don't seem to address the same issue. Even searched out @Larrow's knowledgeable posts, but they also seem to address one aspect or another, not the total package I'm looking for (unless I'm just blind).
My next goal was to make a Module with the same ingredients, but you'd be able to choose side, faction, etc.
Any input would be appreciated.
-
@gatordev I have no issue using "in2a" or out2a" configured in CfgRadio as such:
Spoilerclass CfgRadio { sounds[] = {radio_beep_to, radio_beep_from}; class radio_beep_to { name = "radio_beep_to"; sound[] = {"@A3\Dubbing_Radio_F\sfx\in2a.ogg",db+12,1.1}; title = ""; }; class radio_beep_from { name = "radio_beep_from"; sound[] = {"@A3\Dubbing_Radio_F\sfx\out2a.ogg",db+12,1}; title = ""; }; };
then just use in script like this:
player sideRadio "radio_beep_from" or [playerSide,"HQ"] sideRadio "radio_beep_to"; etc.
Of course you need a radio to use sideRadio
-
For whatever reason, the engine does NOT like:
( _compPos isEqualType "" && { getMarkerPos _compPos != [0,0,0] } )
paired in the same line and spits out the error code:
SpoilerError in expression <EqualType "" && { getMarkerPos _compPos != [0,0,0] } ) : {
if ( _compRot isEqual>
Error position: <!= [0,0,0] } ) : {
if ( _compRot isEqual>
Error !=: Type Array, expected Number,Bool,String,Namespace,Not a Number,Object,Side,Group,Text,Config entry,Display (dialog),Control,Network Object,Team member,Task,Diary record,Locationdeleted incorrect posting here... failed to recognize my own coding
I would say odd behavior, and stick to just entering _compReference = ["ArtyMission", getMarkerPos _artmarker] call LARs_fnc_spawnComp;
3 hours ago, NFG WhatHiMean said:Did you change any of the _compReference paramaters for the LARs call?
If you want to use the marker rotation to set the rotation of your composition, you'll have to just edit fn_getCompPosition:
( _compPos isEqualType "" && { getMarkerPos _compPos != [0,0,0] } ) to be only ( _compPos isEqualType "" )
You can now use just _artmarker and remember to edit your call to LARS_fnc_spawnComp:
_compReference = ["ArtyMission", _artmarker, [0,0,0], true] call LARs_fnc_spawnComp;
-
you can put his code back and just adjust your call to:
_compReference = ["ArtyMission", getMarkerPos _artmarker] call LARs_fnc_spawnComp;
-
Ok, I tested on a sample composition mission I had, and it would not just take the marker name. I got the same error. I had to enter like this:
private _compReference = [ "XoXanhVCPOWCamp", getMarkerPos "marker_0"] call LARs_fnc_spawnComp;
-
something does not seem correct with your mission folder setup or scripts.
Any chance to post screenshots of folder structure with files or upload the mission?
-
With the above screenshot, can you just go simple and try this:
_compReference =["ArtyMission", "arty_spawn_marker"] call LARs_fnc_spawnComp;
-
19 hours ago, Myla Pingarelli said:could this be done in a singleplayer environment? like the init.sqf and not the initServer.sqf?
Of course. In single player, your machine is the server.
See the following:
-
2 minutes ago, NFG WhatHiMean said:This is true, but the composition will be spawned at the coordinates WHERE IT WAS CREATED (someone created this at some place on the map)
These markers are placed in the editor and named as you have given?
2 hours ago, NFG WhatHiMean said:private _ArtySpawnMarkers = [
"arty_spawn_marker", "arty_spawn_marker_1", "arty_spawn_marker_2", "arty_spawn_marker_3",
"arty_spawn_marker_4", "arty_spawn_marker_5", "arty_spawn_marker_6"
]; -
You can't skip parameters. Try like this (if you want ignore_atloffset to be true? Your last parameter is true)
private _compReference =["ArtyMission", _artmarker, [0,0,0], 0, true, true, true] call LARs_fnc_spawnComp;
I should clarify the above. You can't skip if something you want to change is not the default. I have no clue what your ending true is for.
You could just have the following if you do not want to change anything past the position:private _compReference =["ArtyMission", _artmarker] call LARs_fnc_spawnComp;
-
That line should include your class defined...
private _compReference = [ ArtyMission, _artmarker, 0, 0, true, true] call LARs_fnc_spawnComp;
Also, your parameters do not align correctly with what Larrow mentioned:
SpoilerCOMP_NAME - Classname given to composition in CfgCompositions
POS_ATL( optional, default compositions saved position ) - Position to spawn composition If not given or empty array passed then original saved composition position is used
Also accepts OBJECT, MARKER, LOCATION
OFFSET( optional, default none ) - ARRAY [ x, y, z ] ammount to offset composition, as a compositions base pos can vary from what you want when its saved
DIR( optional, deafault 0 ) - Direction to face composition in, If POS_ATL is of type OBJECT, MARKER, LOCATION passing TRUE for direction will use objects direction
ALIGN_TERRAIN( optional, default True ) - BOOL, Whether composition objects should align themselves to their positions surface normal
ALIGN_WATER( optional, default True ) - BOOL, If a composition objects position is over water should they align themselves to sea level
IGNORE_ATLOFFSET( optional, default False ) - BOOL, If True each item in the composition will ignore its ATLOffset that usually gets added to its Z(height)
-
-
_compReference = [ COMP_NAME, POS_ATL, OFFSET, DIR, ALIGN_TERRAIN, ALIGN_WATER, IGNORE_ATLOFFSET ] call LARs_fnc_spawnComp;
Use the private variable _compReference, or something of your choice, because Larrows code is built to return: "The function call will also return a reference string for the composition. Which can be used with some of the provided utility functions."
-
Did you try entering by the Class you defined? class ArtyMission
Otherwise, I'd stick to naming the class the same as the .sqe as Larrow did
-
// is a comment line, and is not read. Just as @Larrow instructed in his thread:
Spoiler//LARs_spawnComp_debug = 1; //1 = RPT output, 2 = RPT output and ingame visual positioning info class CfgCompositions { class Walk { //Name that the composition is spawned by #include "walk.sqe" //Renamed composition.sqe }; };
Here is a bit more on Class Inheritance
-
without digging deep into your entire mission, this part is incorrect:
Spoilerclass CfgCompositions { class ArtyMission { spawnartymission #include "spawnartymission.sqe" }; };
and should be:
Spoilerclass CfgCompositions {
class ArtyMission {// spawnartymission
#include "spawnartymission.sqe"
};
};with // in front of spawnartymission
-
-
@Psychobastard without looking into your changes, the below lines, or variants of, may help alleviate issues with DLC FAK/Medikit in the future:
_hasFAK = ((((assignedItems _unit) + (items _unit)) findIf {getNumber (configFile >> "cfgWeapons" >> _x >> "ItemInfo" >> "type") == 401}) > -1); _hasMedikit = ((((assignedItems _unit) + (items _unit)) findIf {getNumber (configFile >> "cfgWeapons" >> _x >> "ItemInfo" >> "type") == 619}) > -1);
- 2
-
@johnnyboy perhaps a look inside C2 may provide help.
Your image made me immediately think of C2 HUD MODE image on the WS...
-
Bug fix and added another variable to AIS_SETUP. Think this should be the last for now.
Bug fix:
SpoilerSetup:
Previous mission I posted, or use the one in second spoiler. AIS_MEDICAL_EDUCATION = 2
Once the mission starts, give all the units in your squad ALL(~) >> STOP
Shoot the medic in the other group you are facing.
What I found to be a bug:
One of your medics is found to be helper, and in turn runs through the process of move helper function. My medic will not move since he was given STOP, and the function to move helper continues to run forever.
Resolution:
Set a timeout for the move helper function to terminate. I gave the unit a variable: _helper setVariable ["ais_moveHelperTO", diag_tickTime + 30];
This will stop move helper function, and have the injured try to find another.
Added another variable to AIS_SETUP; AIS_INCLUDE_SPAWN_UNITS:
SpoilerAIS_INCLUDE_SPAWN_UNITS = true/false; //Set to true if you want units spawned after mission start to be included in AIS according to AIS_REVIVE_INIT_UNITS selection of "allUnits", "allUnitsBLUFOR", "allUnitsOPFOR", "allUnitsINDFOR", "allUnitsCIVILIAN" (isKindOf >> "SoldierWB", "SoldierEB", "SoldierGB", "Civilian")
I did not use CAManBase, as that one also includes: class UAV_AI_base_F: CAManBase. I know this one is SCOPE = 0, but UAVs inherit from this... Don't need UAV trying to heal anyone, although may be interesting.
test mission S.O.G. Cam Lao Nam again, this one does have a radio trigger to spawn another blufor group (AIS_INCLUDE_SPAWN_UNITS = true).
- 1
- 1
-
13 minutes ago, avibird 1 said:hey panther42 I have fooled around with this for a few years to make a version that can be used with team switch function. I call it last man standing mode. All playable switchable units will never die only go unconscious. The mission will end only if all playable switchable units are unconscious. It was design mainly for small co-op play or solo play. I am going to try to incorporate your changes with my changes to see if this can work the way you designed it and with may design needs for last man standing mode.
I never play COOP or Multiplayer myself, so not certain I will be a great help. Will try what I can. I thought Psycho designed AIS for the following: Auto-Init a group of units: "allPlayers" , "allPlayables" , "allUnits", "allUnitsBLUFOR", "allUnitsOPFOR", "allUnitsINDFOR", "allUnitsCIVILIAN"
Does what you do not fall in these categories?
I mainly spend my time scripting and messing in editor for testing. One I do play is edited DRO for S.O.G.
- 1
-
Thank you @Play3r & @avibird 1 for checking out. Avibird 1, not certain I tagged the correct one, as there are two which show up with same name...
I keep messing around with different settings. Sorry to post multiple test missions. No feedback, so unsure if people even use this anymore.
I have made one more change for now, and I think it works better for AI injury handling. Don't know why I didn't try before, but have now utilized setUnconscious command.
AI do not run around trying to heal the injured AI soldier (Orders via team leader Heal, Heal Solder, etc.). AI squad members react to gunfire and get down. Psycho's AIS is now more in control. AI will heal others/self heal after revived by AIS.
Try it out and give any feedback.
I didn't implement yet for player(s), but may.
Also, tinkering around with capturing units spawned after mission start. Have a good handle utilizing mission event handler EntityCreated, just need to funnel down into what was selected via AIS_SETUP.
May not be worth it, as user can create/spawn own units via script and send to AIS_SYSTEM_fnc_loadAIS as they wish. Any thoughts?
I do have an old copy of auto loading mod, but that one was personal copy I used to load AIS for all units (blufor/opfor)
By the way, does anyone know why the "magic" damage value of .89 was implemented by Psycho?
latest test mission S.O.G. Cam Lao Nam again, this one does have a radio trigger to spawn some enemy AI (basically was part of my test for EntityCreated) and watch a slaughter...
This one is AIS_MEDICAL_EDUCATION = 1
-
Last edit (unless fixes needed) and I'll leave this Psycho circus alone.
Remarks and download below:
Spoiler///////////// Rev 03 //////////////////
18. Changed fn_AIselfCheck line 16 to exclude players: if (!alive _injured_ai || {isPlayer _injured_ai}) exitWith {}; This was necessary since injured revived could be player. Players are supposed to use "H" key to call for help per Psycho design (fn_callHelp >> fn_findAIHelper)
19. Added AIS_EXCLUDE_PLAYER_GRP in AIS_SETUP. True will exclude AI in player group from calling for help from other AI. Kept Psycho original code in fn_AIselfCheck + check for AIS_EXCLUDE_PLAYER_GRP: if (_group_with_player && {AIS_EXCLUDE_PLAYER_GRP}) exitWith {};
20. Added AIS_EXCLUDE_PLAYER_GRP_HOG in AIS_SETUP. True will exclude AI in player group from helping other groups (HOG)
21. Added variable to AI in a player group per 20 above to exclude from search ("ais_exclude_hog")
NOTE: the above added global variables and AI variable are separate from using "AIS_noReviveInit". If a unit has variable set true for "AIS_noReviveInit", they will not be included in AIS per Psycho design- 1
-
Ok, made some more updates after some testing. Decided to add new post rather than edit.
Here are the latest "enhancements":
Spoiler///////////// Rev 01 ////////////////// in edit to previous post
11. If no one is found as a helper via fn_findAIHelper = objNull (all unconscious or busy helpers), I added a check after delay to kick the sequence back to fn_AIselfCheck and check for helper again.
Replace in System >> fn_findAIHelper the following (should be line 121):
if (isNull _helper) exitWith {diag_log format ["############## %1 ############## - AIS findAIHelper helper isNull", missionName]};With:
if (isNull _helper) exitWith
{
if (p42_debug) then {diag_log format ["############## %1 ############## - AIS findAIHelper helper isNull... searching again", missionName]};
private _acc_time = (diag_tickTime + 10);
[{diag_tickTime > (_this select 1)}, {_this call AIS_System_fnc_AIselfCheck}, [_injured, _acc_time]] call AIS_Core_fnc_waitUntilAndExecute;
};///////////// Rev 02 ////////////////// NEW
12. fn_AIselfCheck: changed line 31 to: private _acc_time = (diag_tickTime + 40); this gives increased percentage of first in, first out, instead of random (other factors weigh in here). Plus, more time if player wants to stabilize any unconscious injured. Back to Psycho original
13. fn_handleHealriviveAI: added back in attaching injured to healer for AI>>AI interaction ordered via action Heal, HealSoldier, HealSoldierSelf. This function is only spawned if (_injured getVariable ["ais_unconscious", false]) and (isNull (_injured getVariable ["ais_hasHelper", objNull]))
can eliminate some of the AI repeating heal action over and over. If finished prior to injured regaining consciousness, helper may kneel over injured with weapon ready as if defending.
14. fn_ReviveAI: changed 100% heal from: (AIS_REVIVE_HEAL || _healer getUnitTrait "Medic") to: (AIS_REVIVE_HEAL || {_healer getUnitTrait "Medic" && {"Medikit" in items _healer || "vn_b_item_medikit_01" in items _healer}})
this means not only does healer have to be medic, but must have kit in items (doesn't matter if AIS_REVIVE_HEAL is true, of course). *** Did not implement this for intercepted HandleHeal EH healing, as those units have all fak & kits removed to prevent engine healing. ***
15. Found in testing it was possible for AI units designated as helper and moved to location of injured to never be able to make it within the given distance to the injured due to player stabilizing injured and medical waste spawned near the injured. AI helper would not come close enough to start revive.
Commented out medical waste spawning, line 47 of fn_stabilize. I did try increasing the distance per fn_moveAIHelper line 52 to 5, instead of 3, prior to commenting out the medical waste, but then made larger "jump" for helper to attach to injured.
If you prefer the medical waste, remove comment (//) line 47 of fn_stabilize, and you may need to try increasing distance in fn_moveAIHelper (line 52, _dist = if (!isNull objectParent _injured) then {(sizeOf (typeOf (vehicle _injured)) / 2) + 1} else {3};)
16. Also found while testing 15 above, if I shot several units in my team (five members in group, I shot both medics, and the other two) and they became unconscious. Medic from AI group would come to help and while he was helping one, I stabilized the other three.
These other three which were now stabilized could be lost to AI reviving (fn_AIselfCheck >> fn_findAIHelper).
AIS_MEDICAL_EDUCATION = 2, Player (me) is not medic and can stabilize, but not revive.
Per Psycho documentation, "Stabilize a unit. A stabilized unit stop to bleed and cant die trough the revive timer." Well, let's get 'em stabilized for the medic...
Remedy: in fn_stabilize, add a callback to fnAIselfCheck after player has stabilized. This is through AIS_Core_fnc_Progress_ShowBar. I only did this if (AIS_MEDICAL_EDUCATION == 2 && {!(_healer getUnitTrait "Medic")}) because we already know in this case the person stabilizing cannot revive.
in the AIS_Core_fnc_Progress_ShowBar onAbort code, also added callback to fnAIselfCheck if helper had become unconscious during stabilize (abort condition)
17. Changed fn_allowRevive from: player getUnitTrait "Medic" to: player getUnitTrait "Medic" && {(items player) find "Medikit" > -1 || (items player) find "vn_b_item_medikit_01" > -1}
not only must player have medic trait but kit in items for (AIS_MEDICAL_EDUCATION = 2)Again, test mission is S.O.G. DLC loaded and on Cam Lao Nam. I changed groups, left medic in AI group, and spawn player group perpendicular to AI group to allow better visual
After many years... decided to mess around with the communication menu
in ARMA 3 - MISSION EDITING & SCRIPTING
Posted
Ok, thanks @Larrow. From what I understand then, I can only update what is set in the description.ext and stored in BIS_fnc_addCommMenuItem_menu.
In my case, this shows up as:
[[1,"Call Reinforcements","#USER:MENU_REINFORCE_1","_this = [bis_o1,_pos,_target,_is3D,1];","1","","\a3\Ui_f\data\GUI\Cfg\CommunicationMenu\call_ca.paa",""]]
Using your post, which I did read previously and was trying to decipher how I could use it, I would need to do the following if I wanted different menu for another faction:
1. Create MENU_REINFORCE_4, 5, etc., which would be identical to MENU_REINFORCE_1 (edit as needed if "Reinforce Paradrop" will not be option)
2. Create all the MENU_REINFORCE_4_1..._4_5, etc. submenus to MENU_REINFORCE_4
3. Add your functions to mission and edit a bit, and based on faction of player, I should be able call [ "Reinforce", "#USER:MENU_REINFORCE_4" ] call p42_fnc_updateCommMenuItem; (my description.ext class is Reinforce)
4. In your function update to:
//Function to apply any arguments to a commMenu item
p42_fnc_updateCommMenuItem = {
params[ "_item", "_args", [ "_menuID", -1 ] ];
//Find the menu item index
_menuIndex = if ( _menuID > -1 ) then {
player getVariable "BIS_fnc_addCommMenuItem_menu" findIf{ _x select 0 isEqualTo _menuID };
}else{
missionNamespace getVariable[ "p42_commMenuItems", [] ] findIf{ _x select 0 == _item };
};
//If found
if ( _menuIndex > -1 ) then {
//Custom for what menu item?
switch ( toLower _item ) do {
case ( "reinforce" ) : {
//Update reinforcement menu
player getVariable "BIS_fnc_addCommMenuItem_menu" select _menuIndex set[ 2, _args ] ];
};
};
//Update commMenu ( sets missionNamespace menu reference )
[] call BIS_fnc_refreshCommMenu;
};
};
I think I'm tracking. Is this what your intent was?
FWIW, the use of TAG in peoples functions/scripting was supposed to identify individual creators and is/was kept at OFPEC.
I see a lot of users just keep the "TAG" not knowing what it means...
Ok, after looking over the code in that function, a direct call to it will not work with only the two passed parameters because it only queries BIS_fnc_addCommMenuItem_menu if the third parameter is passed for the index ("_menuID",-1) and > -1.
Direct call would need the ID from when I initially stored in: private _callReinf = [player,"Reinforce"] call BIS_fnc_addCommMenuItem;