Jump to content

Recommended Posts

Dq8LL1q.jpg

 

 

Download:

MIL_CAS - Dropbox/Armaholic

 

Description:

MIL_CAS is a simple script to allow a mission designer to use the vanilla CAS Module in-game via scripting. All this does is perform the required actions to properly call BIS_fnc_moduleCAS. Best suited for ambience, the strikes shouldn't be relied on for 100% accuracy.

 

Features:

- Position and approach heading can be defined.
- Plane and type of CAS to be provided can be defined.

 

To use:

- Copy the file MIL_CAS.sqf to your mission folder.
- Run the script using:

- nul = [_position,_direction,_vehicle,_type] execVM "MIL_CAS.sqf";

- _position - array
	    - position for CAS to strike
- _direction - number
	     - direction for the CAS to approach on
- _vehicle - string (optional)
	   - default: "B_Plane_CAS_01_F"
	   - classname of the plane to fly CAS
- _type - number (optional)
	- default: 2
	- type of CAS to be used
		- 0 - Guns
		- 1 - Missiles
		- 2 - Guns & Missiles
		- 3 - Bomb

 

- Examples:

- nul = [getPos player,240] execVM "MIL_CAS.sqf";

- Wipeout will fly in for a "Guns & Missiles" run.
- nul = [getPos player,240,"RHS_A10",3] execVM "MIL_CAS.sqf";

- A-10 will fly in and drop a single bomb.

 

Credits:

- This uses the vanilla function BIS_fnc_moduleCAS for the actual CAS. All I did was make an easy way to launch it from a script.

 

Media:

Everyone knows what CAS is all about, but here is all four types being called in anyway (0.52):

 

 

If anyone finds any problems please let me know.

 

Thank you.

  • Like 8
  • Thanks 4

Share this post


Link to post
Share on other sites

Hello Beno,

On 9/2/2018 at 4:26 AM, beno_83au said:

To use:

- Copy the file MIL_CAS.sqf to your mission folder.
- Run the script using:

A few questions for you on how to get this working.

  1. So the script is in my mission folder, and according your instructions here, do i copy the whole code or a part of it, and where do i put it?
  2. So my understanding is you dont need the support cas module anymore as the script will call it instead correct?
  3. Now if thats the case like the support requester, is there an option to limit how many cas missions one can call?
  • Like 1

Share this post


Link to post
Share on other sites
1 hour ago, Gunter Severloh said:

So the script is in my mission folder, and according your instructions here, do i copy the whole code or a part of it, and where do i put it?

 

Once the file is in your mission directory, leave it as it is. You then only need to run it using as per the instructions above (nul = [_position,_direction,_vehicle,_type] execVM "MIL_CAS.sqf";).

 

1 hour ago, Gunter Severloh said:

So my understanding is you dont need the support cas module anymore as the script will call it instead correct?

 

Correct. 

 

1 hour ago, Gunter Severloh said:

Now if thats the case like the support requester, is there an option to limit how many cas missions one can call?

 

Running the .sqf once will call in one CAS strike. So as an example, if you're using it in an addAction just delete the action when you run it. 

 

Hope that covers it, but if not just say so. I've tried to make this as simple as possible to call in CAS so let me know how you go. 

  • Thanks 1

Share this post


Link to post
Share on other sites
1 hour ago, beno_83au said:

You then only need to run it using as per the instructions above (nul = [_position,_direction,_vehicle,_type] execVM "MIL_CAS.sqf";).

Thats what im asking about, run it how?

Where do i put the code, in the players init, the mission's description, init.sqf, the localplayer.sqf, a trigger in the editor?

1 hour ago, beno_83au said:

Running the .sqf once will call in one CAS strike. So as an example, if you're using it in an addAction just delete the action when you run it. 

I get what your saying to a point but idk how to implement that got to give me some details.

Share this post


Link to post
Share on other sites

@Gunter Severloh Sorry mate, excuse the confusion. Safest way would be to run it server-side (e.g. initServer.sqf or a trigger that only runs on the server). I can give an example/explanation for that and a single use addAction but it'll have to wait until later. I'm just starting work now. Happy to help though. 

Share this post


Link to post
Share on other sites

@Gunter Severloh

 

If you wanted to give a single, specific player the option to call in CAS once only, it would look something like this:

 

if (player == CAS_player) then {
	_id = player addAction [
		"Call CAS",
		{
			params ["_target","","_id"];
			nul = [screenToWorld [0.5,0.5],90,"B_Plane_CAS_01_F",3] execVM "MIL_CAS.sqf";
			_target removeAction _id;
		},
		nil,
		0,
		true,
		true,
		"",
		"alive _target",
		-1,
		false
	];
};

 

Name the player you want to call in the CAS as CAS_player, then with this example run it from initPlayerLocal.sqf. That way when the mission starts ONLY the player named CAS_player will have the action added to them. The code in the addAction will have the player call in the CAS strike where the player's cursor is pointing (the ground, a building, whatever they're looking at) and then remove the action, so that they can't call it again. To change the parameters of the CAS, just edit this line in the addAction as described in the OP:

nul = [screenToWorld [0.5,0.5],90,"B_Plane_CAS_01_F",3] execVM "MIL_CAS.sqf";

Does that fit with what you are trying to achieve?

  • Like 1

Share this post


Link to post
Share on other sites

Thanks for the added details, i like the concept but im interested in the interaction between the player and the pilot.

 

With this concept i think the Bis support module for cas is a good start in terms of communication between player and pilot but i think the

interaction could be a bit more enhanced for example:

  1. the player character will say requesting cas at this position
  2. then you have to mark the target, with an option, either with smoke, or with laser designator
  3. from there pilot needs to confirms target, once he confirms then
  4. you have option to tell him to use guns, guns, and missiles, just missiles or bomb the target.
  5. once you have made your choice then the pilot would confirm, then would ask you for the go or all clear to engage
  6. Once you give the ok to engage, he will respond with engaging, and then you would have to wait for him based on where he is at from the target.

You could also add the option in there to get a status on how far away he is.

Im after a bit of realism.

 

I dont want to ask you to create a whole script and such from this idea, i mean what you have works already, i just want to enhance it a bit more.

 

The addaction example works, and i like the fact that there is a real plane flying around that you can call for cas, but its to simple,

i want to the player to do some work to get the cas support, i mean in a real fight, your calling in some serious support be it an a10 or another type of plane to come

in and bomb or gun the shit out of your target, and thats not something you can really pull off yourself at that magnitude if you know what i mean.

 

Lastly Still have it be called from the radio tho, addaction is cool but i like the idea if it were called from a radio, realism of it would add more immersion.

  • Like 2

Share this post


Link to post
Share on other sites
4 hours ago, Gunter Severloh said:

Im after a bit of realism.

 

How realistic were you after? I can go pretty far in that regard, plus i also like realism (some of the other stuff I've released is based on realism). I'd leave this script alone though and just make a new one. Sounds like a good project to get into. 

Share this post


Link to post
Share on other sites
18 hours ago, beno_83au said:

How realistic were you after?

Ideally for me it would be my example, calling from a radio or backpack radio either on you whereas you are acting as a Jtac.

The interaction with your player character's voice and the pilot i think would really add to the immersion for calling in cas.

The options for the type of cas too would make it interesting - helicopter, A10, guns, missiles, bombs, jdams, etc,. AC130 Gunship would be badass.

 

Heres script i tried that is fairly realistic, but it doesn't have the voice aspect involved, check it out.

http://www.armaholic.com/page.php?id=31949

 

  • Like 1

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×