Jump to content

Recommended Posts

dca9baae-5872-463c-84ea-27870ad8991a_zps

 

DMC Air Patrol

 

This is something that has been gathering some dust on my hard drive. Originally written for one of my ArmA II missions I've decided to revive it for ArmA III in the hope that somebody might find it useful. If you do implement it into your missions I'd be happy if you would let me know where to download them. I'd love to see how people make use of this script.

What does it do ?

DMC Air Patrol is a script that can spawn a configurable amount air patrol vehicles including crew. It will read the configuration file of the current map and use the predifined locations in this file to plot a randomized flight course for each patrol vehicle. If an air patrol encounters an enemy presence in it's flight path it will attack and try to obliterate the enemy. When done the air patrol will return to it's flight path and repeat as new enemies are encountered. If a patrol vehicle is destroyed a replacement will be spawned after a configurable timer runs out.

Which options can be configured ?

1. Search radius for pre-defined map locations
2. Spawn positions for the air patrol vehicle
3. Name of the marker representing the area of operations center for the air patrol
4. Type of vehicle used by air patrol
5. Side of the air patrol
6. Flight altitude
7. Rules of engagement
8. Combat behaviour
9. Movement speed
10. Skill of the crew
11. Amount of patrol vehicles to spawn
12. Time to wait before spawning a new instance of a patrol vehicle if destroyed
13. Whether or not to randomize waypoints

How do I implement it in my mission ?

The download contains 2 demo missions (Stratis / Altis) that should be pretty much self explanatory. I've also provided an init.sqf that can be ripped apart to cater your needs. Basically all that's needed in your mission is some markers that represent spawn locations which will be read and then randomized by the script upon init. Since version 1.3 there's a readme.txt included which describes the implementation in even more detail.

Does it work in Multiplayer ?

Actually it should. Since the script is only run on the server and does not need to communicate with clients I don't see why it would not. Though I haven't tested it and if you encounter any multiplayer weirdness let me know.

Where is the download ?

Dropbox mirror: DMC Air Patrol
Dev Heaven mirror: DMC Air Patrol

 

Changelog:

http://dev.withsix.com/projects/dmc-air-patrol/news

 

Bugtracker:

http://dev.withsix.com/projects/dmc-air-patrol/issues

 

Hints for mission editors:

- If you want three air patrols in your mission you need to define three starting positions

- If the script throws errors relating to waypoints, make sure your location search radius is big enough to contain map locations (Towns / Villages)

Edited by demon cleaner
updated download links

Share this post


Link to post
Share on other sites

Thanks for informing us of the release :cool:

Release frontpaged on the Armaholic homepage.

===================================================

We have also "connected" these pages to your account on Armaholic.

This means in the future you will be able to maintain these pages yourself if you wish to do so. Once this new feature is ready we will contact you about it and explain how things work and what options you have.

When you have any questions already feel free to PM or email me!

Share this post


Link to post
Share on other sites

Excellent script Demon Cleaner.

Quick question, Because Altis is so large, do you have plans for to allow multiple aircraft to patrol?

Thank you for sharing your work with us!

Share this post


Link to post
Share on other sites

Thanks Hajimoto. You could always make the script into a function and compile it on mission init. Then when you feel you need another patrol simply call the function to generate a new instance. However I'll take a look at whether I can implement a parameter to specify how many patrols to spawn.

Share this post


Link to post
Share on other sites

As per request the number of patrolling vehicles can now be specified as a parameter. Actually I've changed things around quite a bit. The script is now pre compiled on init and thus can be used as a function and be called when needed. I've also changed the way vehicle respawns are handled. If a patrol vehicle is destroyed it will now automatically spawn a new vehicle automatically after a configurable timer runs out. The init.sqf has changed quite a bit as well but it's all well commented so the transition if you've used the old version should be easy enough. The link in the first post has been updated. Enjoy.

Share this post


Link to post
Share on other sites

Thanks for informing us of the update release :cool:

Release frontpaged on the Armaholic homepage.

===================================================

We have also "connected" these pages to your account on Armaholic.

This means in the future you will be able to maintain these pages yourself if you wish to do so. Once this new feature is ready we will contact you about it and explain how things work and what options you have.

When you have any questions already feel free to PM or email me!

Share this post


Link to post
Share on other sites

No need to specify the current game world name as parameter anymore. I feel kinda useless that I didn't spot worldName the first time I was looking into this ... Anyway the script has been updated to v1.2. Download links in the first post have been updated as well. BTW: I'm using the bugtracker over at dev-heaven now so file bugs and feature requests over there please. Enjoy!

Edited by Demon Cleaner

Share this post


Link to post
Share on other sites

Thanks for informing us of the release :cool:

New version frontpaged on the Armaholic homepage.

===================================================

We have also "connected" these pages to your account on Armaholic.

This means in the future you will be able to maintain these pages yourself if you wish to do so. Once this new feature is ready we will contact you about it and explain how things work and what options you have.

When you have any questions already feel free to PM or email me!

Edited by Foxhound
mirror updated

Share this post


Link to post
Share on other sites

An update is available. Version is v1.3 now. Download links in first post have been updated. Enjoy!

Changelog for v1.3:

- Reworked waypoint randomization

- Added DMC_spawnAirPatrol function to autoinit (auto compilation)

- Removed uneccessary check for BIS fnc init (functions are preloaded)

- Added debug markers for mission designers (check variables in init.sqf)

- Larger waypoint completion radius

- Default patrol time (vehicle respawn) changed to 60 minutes

- Changed combat behaviour to make air patrols more agressive

- Changed air patrol vehicle crew default skills

- Changed air patrol vehicle default flight altitude

- Changed air patrol vehicle default speed to FULL

- Added a readme.txt explaining how to implement this script

Share this post


Link to post
Share on other sites

Thanks Demon Cleaner,

I havent tried it yet but sounds great, would it be possible to add a squad if helo has cargo room, i like it when helo's inserts a squad to help engage enemy on the ground.

Share this post


Link to post
Share on other sites
Thanks Demon Cleaner,

I havent tried it yet but sounds great, would it be possible to add a squad if helo has cargo room, i like it when helo's inserts a squad to help engage enemy on the ground.

The check for empty cargo positions is easy but the logic of when to deploy the units in cargo is a bit more tricky. Let's assume you only have one patrol waypoint. Well that's easy then. You reach the patrol waypoint and deploy the troops. However the script can generate a random flight path from the available waypoints which means that you don't know if the waypoint you placed some enemy will be first, last or anything inbetween. Secondly you can only really deploy the in cargo units once (respawning units into empty cargo positions in flight could be done but that doesn't really solve the issue of WHEN to deploy). Anyway I'll play around a bit to see what I can come up with. Thanks for the suggestion anyway. I'll report back on this one.

Share this post


Link to post
Share on other sites

Hi can you help? when i download your demo i try to open them and they are empty no code etc, also i put the demo mission in correct place and go to editor i can see the mission name it starts up but theres not a thing showing in editor. This is the first time this has happened to me, it seems when i've downloaded the file there empty?

Share this post


Link to post
Share on other sites
Hi can you help? when i download your demo i try to open them and they are empty no code etc, also i put the demo mission in correct place and go to editor i can see the mission name it starts up but theres not a thing showing in editor. This is the first time this has happened to me, it seems when i've downloaded the file there empty?

Sounds like a broken download... Download the archive again just to be sure.

When you open the downloaded archive it should contain the following files and folders:

functions

functions\fn_spawnAirPatrol.sqf

cfgFunctions.hpp

cfgHints.hpp

description.ext

init.sqf

mission.sqm

readme.txt

If you have verified the archive contains the above files, load up the mission in the editor. There should be a couple of vehicles at the Altis International Airport (if you're using the Stratis version check the airfield complex) as well as the player starting position. You can start the mission from the editor as you would with any other singleplayer mission.

Share this post


Link to post
Share on other sites

Hi i still cannot see what's in these files our use it in the editor, it does look like broken download, its the first time this has happened with an Armaholic download.

Share this post


Link to post
Share on other sites

I've added this into my mission, really cool script to be strolling along and suddenly have a gunship on yo' ass xD Will let you know when the mission's released :rthumb:

Edit: Anyone got this working for planes? Whenever I put them into the config it says they're unsuitable and uses the default heli :(

Edited by Spencer42

Share this post


Link to post
Share on other sites

im trying to add this to my mission, but my mission alred have a cfgfunction.sqf file and its inside a folder named server, when i just add your files to my mission it says there is alred a cfgfunction being loaded, tryed to merge the two files, but have no sucsses, says fn_DMC.sqf is missing... any clue?

so its like these

mymission\server\CfgFunctions.hpp

mymission\server\functions\fn_spawnAirPatrol.sqf

instead of

mymission\CfgFunctions.hpp

mymission\functions\fn_spawnAirPatrol.sqf

Edited by brunohxcx

Share this post


Link to post
Share on other sites

this sounds cool I will give it a try.

After looking at the init.sqf, it appears you can have many air patrols of different sites, types and an array of parameters. Very nice. I will try this and see how it plays out.

Edited by JAndrews1

Share this post


Link to post
Share on other sites
this sounds cool I will give it a try.

After looking at the init.sqf, it appears you can have many air patrols of different sites, types and an array of parameters. Very nice. I will try this and see how it plays out.

After attempting to set this up, getting errors. Have it set exactly the same as your mission. Your mission runs find in my editor. Don't know WTF is wrong.

Basically getting a message that script "functions" is not found.

19:18:37 Error in expression <FE","NORMAL","SAD",0.85,1,30,TRUE] call DMC_fnc_spawnAirPatrol;
private ["_air_p>
19:18:37   Error position: <DMC_fnc_spawnAirPatrol;
private ["_air_p>
19:18:37   Error Undefined variable in expression: dmc_fnc_spawnairpatrol
19:18:37 File C:\Users\Andrews\Documents\Arma 3\missions\mission_setup.Altis\initServer.sqf, line 74

Here is my des.ext

class CfgFunctions
{
#include "EPD\EPDcfgFunctions.hpp"			 // IEDs
#include "scripts\VAS\cfgfunctions.hpp"			 // VAS
//#include "scripts\VVS\Functions.h"			 // VVS
#include "scripts\taw_vd\CfgFunctions.hpp"		 // View distance
#include "SRS\CfgFunctions.hpp"				// SRS Revive
#include "JSHK_garrisonAll\cfgfunctions.hpp"	        // JShock patrols
#include "cfgFunctions.hpp"				        // DMC air patrols
};

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

×