Jump to content
🛡️FORUMS ARE IN READ-ONLY MODE Read more... ×
Ex3B

Enabling multiple types of Virtual CAS

Recommended Posts

So I've been trying to make a mission where the player can call in CAS from multiple virtual modules.

I want 1 type to be a standard LGB cas mission, another type to be with cluster bombs, and the 3rd to be with laser guided scalpels.

 

So I've made virtual cas modules which spawn a black wasp (stealth), and I modify the inits as follows:

Spoiler

// For cluster bomb support

_this  flyInHeight 800;
  _spl =  _this setPylonLoadout [11, "PylonMissile_1Rnd_BombCluster_01_F",  true, []];
  _spl =  _this setPylonLoadout [12, "PylonMissile_1Rnd_BombCluster_01_F",  true, []];

 

//For Scalpel support:

_this  flyInHeight 800;
  _spl =  _this setPylonLoadout [11, "PylonRack_4Rnd_LG_scalpel",  true, []];
  _spl =  _this setPylonLoadout [12, "PylonRack_4Rnd_LG_scalpel",  true, []];

If I place a single module this way, I can call in the CAS, and it works (cluster bombs get dropper, scalpels get fired at the laser targets, etc)

The problem is that I can't figure out a way to have even 2 types of support present at once. I even tried to have different classes of aircraft delivering the CAS (Blakc wasp, black wasp stealth, wipeout), yet only 1 aircraft type ever shows up in the support menu.

How can I fix this?

Can I give custom names? I'd like the support menu to have something like

"Close Air support" (instead of CAS bombing run, since the scalpel loadout works)

->

LGB loadout

CBU loadout

Scalpel loadout

I'd also like to remove the unguided option for the Scalpel loadout.

 

Any help would be appreciated.

 

Share this post


Link to post
Share on other sites

Tried all combinations that came to my mind, multiple providers on one requester module, requester modules for each provider module, CAS support only showed up once despite me placing 3x different provider modules of the same type (CAS bombing).

Your best bet would be to use a custom script or write your own one that does what you want.

 

A bit more clumsy/wonky/arma-esque approach would be to have the provider modules vehicle init field check for a custom flag and change the airplanes loadout accordingly:

 

In the support provider (CAS bombing) limit vehicle types:

["B_Plane_Fighter_01_Stealth_F"]

 

support provider modules vehicle init:

_this call GOM_fnc_CASloadout

 

init.sqf:

_init = [] execVM "GOM_fnc_CASLoadout.sqf";

 

GOM_fnc_CASLoadout.sqf in mission root:

	//this function will be executed when the CAS plane spawns
	GOM_fnc_CASLoadout = {
		params ["_CAS",["_debug",true]]; //set _debug to false if you don't need the messages


		_loadout = player getVariable ["GOM_fnc_CASLoadout","DEFAULT"];

	if (_loadout isEqualTo "DEFAULT") exitWith {true};

	removeAllWeapons _CAS;
	_CAS  flyInHeight 800;

	if (_debug) then {

	systemchat format ["CAS launched - %1 - %2",typeOf _CAS,_loadout];

	};


	if (_loadout isEqualTo "CLUSTER") exitWith {

	 _CAS setPylonLoadout [11, "PylonMissile_1Rnd_BombCluster_01_F",  true, []];
	 _CAS setPylonLoadout [12, "PylonMissile_1Rnd_BombCluster_01_F",  true, []];


	true};

	if (_loadout isEqualTo "SCALPEL") exitWith {

	_CAS setPylonLoadout [11, "PylonRack_4Rnd_LG_scalpel",  true, []];
	_CAS setPylonLoadout [12, "PylonRack_4Rnd_LG_scalpel",  true, []];

	true};
	true
	};

 

and InitPlayerLocal.sqf:


	//this will give the player the option to cycle between CAS types

	_ID = player addAction ["Select CAS Type (Current: ""DEFAULT"")",{

		params ["_object","_caller","_ID"];

		_modes = ["DEFAULT","CLUSTER","SCALPEL"];

		_index = _object getVariable ["GOM_fnc_CAScurrentType",0];
		if (_index >= (count _modes - 1)) then {_index = 0} else {_index = _index + 1};
		_object setVariable ["GOM_fnc_CAScurrentType",_index];

		_currentMode = _modes select _index;

		_loadout = _caller setVariable ["GOM_fnc_CASLoadout",_currentMode,true];

			_hint = format ["Current CAS mode is now %1!\n\nModes:\n%2",_currentMode,_modes];
				hintsilent _hint;

		_object setUserActionText [_ID,format ["Select CAS Type (Current: ""%1"")",_currentMode]]


	}];

This way you can easily add more CAS types if needed, as long as you watch out for case sensitivity and modify both CAS_loadout.sqf and the _modes array in InitPlayerLocal.sqf.

 

Might do the trick. Demo mission.

 

 

Too bad arma AI still can't figure out they're flying a stealth jet from 2035 that doesn't need to dive bomb down to 20m before releasing the ordnance...

 

Cheers

  • Thanks 2

Share this post


Link to post
Share on other sites
Quote

Too bad arma AI still can't figure out they're flying a stealth jet from 2035 that doesn't need to dive bomb down to 20m before releasing the ordnance...

Yea, Its particularly bad when the target is a military tower on the top of a hill, I've had them crash multiple times.

Before dealing with the support system, I was using "real" aircraft sitting on the USS Freedom, placed way odd the map, and using radio commands (since the AI won't use the catapult launch, I used a set velocity command to launch them), but the aircraft AI proved to be a problem. I wanted them to just fly to the mission area, and engage any laser targets they spotted, but they were very ineffective at that, and would often go off chasing stuff patrolling the mission area, or even engaging MRAPs or some other ground target with their 20mm gun.

 

As an alternate to the CAS modules, do you know of any way to limit their AI to engage only laser targets, and to ignore everything else (and stay flying at high altitude until its engaging a designated target)?

Share this post


Link to post
Share on other sites

From what I know the AI already sets laser targets to high priority, as long as there's no AA units around.

The divebombing is something without workaround, as far as I know of.

 

Cheers

Share this post


Link to post
Share on other sites

Hello

Not sure if I'm right here but I'm new here and searched a while, couldn't find what I wanted to know. I want to get my whole team being able to call in CAS by a trigger. Means, if any member in my team (or only the teamleader, that's not important!), fires a trigger, then EVERY (that's important!) teammember should be able to call in CAS. It works for only one player but I can't get it work for each one in my team.

I tried:

"p1 synchronizeObjectsAdd [cas]; p2 synchronizeObjectsAdd [cas]; p3 synchronizeObjectsAdd [cas];" where p1..p3 are the players, cas is the support module.

Only p1 will be able to call in cas. I also tried to make a specific trigger for each player as a workaround, also I tried 1 trigger for p1 for artillery, another trigger for p2 for heli-transport and so on, didn't work. (Tried this in many different ways!) Seems to me, like the support module can only be activated once, could this be??? (I can fire all these specific triggers with the specified player but only one of them, so each one for itself works, but only ONE! If I fired one, no other will work after that!)

I read here and there that there is a bug in eden with triggered cas for several players, maybe this is just the problem???

I'm pretty new to editing, so be nice! ;-)

Thank you!!!!

 

  • Like 1

Share this post


Link to post
Share on other sites
13 hours ago, Grumpy Old Man said:

Too bad arma AI still can't figure out they're flying a stealth jet from 2035 that doesn't need to dive bomb down to 20m before releasing the ordnance...

 

Cheers

@Ex3B AND @Grumpy Old Man....Hey guys, I know is not EXACTLY what is been discussed here, but I handle that problem like this:

I use a script that spawn a JDAM explosion, either by a spawned aircraft (but that need some markers for drop location and egress route ) or just the explosion,with or without damage.

The way I did to simulate high altitude/missile bombing is this: use laserTarget to give the "bomb" a target, add a random delay, and add a custom "fly-by" sound and..BOOOM. You get the feeling... not exactly "real" but I can't handle that diving bombing myself...

Share this post


Link to post
Share on other sites

×