John 540 Report post Posted December 17, 2015 (edited) Updated 05/01/16 - Fixed issue if aircraft crashes in the water, the script will now not execute the rescue event. (Keep in mind it is fully intended that nothing should occur if the aircraft is shot down in water) Updated 04/01/16 - Added code to stop AI fleeing - Added code to make the rescue crew roam around the crash - Possible fix for chopper crew not attacking players..maybe. - Fixed some script errors. Hi guys, I'd like to share with you another script I made. This script uses similar formats and settings as my Roaming Trader script, so it might look similar and contain the same names and stuff like that. Installation - create a file - "airpatrol.sqf" put it in your mission folder. inside your init.sqf put [] execVM "airpatrol.sqf"; If you have no init.sqf, create one. http://pastebin.com/spgzRS4H I am a big fan of dynamic events that tell a bit of a story and are immersive, this script is a "mission" of sorts however it doesn't just spawn a marker and some AI. Some screen shots can be seen at the bottom of the page here http://exile.majormittens.co.uk/topic/7336-exile-unrest2k-startsurvivalsicknessbleeding/ **Disclaimer** as with any of my scripts, I am in a state of constant learning, so please take it easy on any bugs or issues you may find. I have tested it heavily and it seems to be tip top. Special thanks - Kellojo for his script http://exile.majormittens.co.uk/topic/6601-etg-helicrash-and-drop-script/ some of his code helped me overcome some hurdles I could not figure out. How it works An A10 strike aircraft will spawn and patrol the island, it will not attack players or AI. It will do this for a period of time, and look cool as hell. After a certain amount of time, the script rolls a dice to see if the mafia will despatch an Interceptor aircraft to take out the jet. If the dice roll is successful the interceptor will be given the same waypoints as the A10 and have 5 minutes to seek it out and destroy it. If the roll is unsuccessful, after 20 minutes of flying about the A10 will be destroyed. Once the aircraft is destroyed A rescue ghosthawk will be despatched to secure the crash site, it will fly in from a random point on the map and land at the crash site, unload its crew and defend the area. The ghost hawk will have loot items inside its inventory and be accessible to players should the defeat the AI and take it. Once the A10 is destroyed, the Interceptor aircraft will fly off to the corner of the map and wait to be deleted. Rewards The rewards for players are the Ghosthawk it self, the loot in contains and the weapons on the spawned AI (all able to be customized) **notes** The Ghosthawk , AI and aircrash do not get deleted. This event is designed to be a one off, so I like to keep the objects in game. Debug markers - These are suppose to be debug markers for testing, this script is not designed to have any markers at all, use them in game at your own risk... Issues - There is a very rare circumstance where if the A10 is destroyed over water, the mission basically halts, the ghosthawk will spawn but not go to the crash site. I havent had the time to fix this yet, it is very rare for it to happen. The INTERCEPTOR aircraft, is by design set to combat mode red - This means it will attack other AI unfriendly to INDEPENDENT. I want it this way, it is not guaranteed to kill the A10, so it may attack DMS AI, A3XAI etc, this is about immersion more so then scripted behavior. The A10 will always be destroyed by the script after 20 minutes. Edited January 7, 2016 by John 11 Share this post Link to post Share on other sites
xface 48 Report post Posted December 18, 2015 (edited) Hi, Script not working Spoiler 15:47:01 Error in expression < _debug = false; if (_useMarkerWaypoints) then { _wayPointOne> 15:47:01 Error position: <_useMarkerWaypoints) then { _wayPointOne> 15:47:01 Error Undefined variable in expression: _usemarkerwaypoints 15:47:01 File mpmissions\__cur_mp.Altis\custom\airpatrol.sqf, line 43 --------------------------- 15:53:21 Error position: <_possiblePosStart, EAST, ["B_Plane_CAS_0> 15:53:21 Error Undefined variable in expression: _possibleposstart 15:53:21 File mpmissions\__cur_mp.Altis\custom\airpatrol.sqf, line 211 Edited December 18, 2015 by xface Share this post Link to post Share on other sites
John 540 Report post Posted December 18, 2015 (edited) http://pastebin.com/W7UgWXCR fixed Edited December 18, 2015 by John Share this post Link to post Share on other sites
xface 48 Report post Posted December 18, 2015 (edited) 5 minutes ago, John said: Dont use marker waypoints, I should disable that setting. chang line 34 _useMarkerWaypoints = false; This line is comment , i am not chage it Spoiler /************************************************************************************************/ /** DEBUG MARKER ********************************************************************************/ /************************************************************************************************/ _debug = false; // Will create a marker that will follow the Air craft /************************************************************************************************/ /** If using fixed locations or waypoints *******************************************************/ /************************************************************************************************/ /* _fixedStart = false; //If true trader will spawn at fixed location _fixedStartLoc = getMarkerPos "yourmarker"; //If _fixedStart is true, create a marker and put the marker name here _useMarkerWaypoints = false; //If true, will use set markers instead of random positions - If true populate "yourmarker" with the marker names created _markerWaypointOne = getMarkerPos "waypoint1"; //Create a marker and name it waypoint1 _markerWaypointTwo = getMarkerPos "waypoint2"; //Create a marker and name it waypoint2 _markerWaypointThree = getMarkerPos "waypoint3"; //Create a marker and name it waypoint3 _markerWayPointFour = getMarkerPos "waypoint4"; //Create a marker and name it waypoint4 */ /************************************************************************************************/ if (_useMarkerWaypoints) then but him do not comment? Edited December 18, 2015 by xface Share this post Link to post Share on other sites
John 540 Report post Posted December 18, 2015 I fixed it, was my fault. Get the new one Share this post Link to post Share on other sites
xface 48 Report post Posted December 18, 2015 Thanks Share this post Link to post Share on other sites
F1Schu 45 Report post Posted December 18, 2015 This script sounds great buddy, will try it out later on and see how it goes. Thanks!! Share this post Link to post Share on other sites
|DG|SixKado 5 Report post Posted December 18, 2015 Just tossed it on my test server to give her a good go. Share this post Link to post Share on other sites
Hakimos 78 Report post Posted December 18, 2015 Hi, thx for the script already tested work without problem but there is just 2 thinks: First: there's no marker on A10 crash maybe if u can add one Second : the AI around ghost hawk didn't attack & one of them run away when u shoot Share this post Link to post Share on other sites
BetterDeadThanZed 1006 Report post Posted December 18, 2015 I'm running this on my test server. The heli crashed in the ocean (and the interceptor kept flying around - didn't go away). I checked the log and some weird stuff happened after the crash. I'm not sure if this is just a product of the latest Arma 3 version or if it's directly related to the script, but here ya go: http://pastebin.com/vjPeTev8 Share this post Link to post Share on other sites