St3v3f Posted July 31, 2013 Share Posted July 31, 2013 (edited) This script disables slots in a mission that have been shot down or otherwise lost. It is 'relatively' easy to add to existing missions, as you can see in the attached version of Dragon's Hamburger Hill. If you use it, please at this to the briefing, change the red parts to fit into your mission: ############ Baron's CSAR Script: If your aircraft is shot down or disappears for any reasons including 'Back to Spectators' or 'Connection Interrupted' for whatever reason, this particular slot will be deactivated. To reactivate, it is required to have a rescue helicopter (UH-1H from FARP or the Airbase) to pick up the downed pilot and return him to either his home base or to your team's FARP. You can get a list of all deactivated slots and their pilot's location by entering '-stl' into the chat. Observe the following rules: 1. You can safely quit a slot if you are parked at your coalition's airbases or FARPs or enemy FARPs and bases that have been captured 2. After the rescue has been completed, the slot will remain deactivated for some time unless you either ejected before destruction or landed the aircraft anywhere. In that case, it will be reactivated immediately after rescue. 3. Attacking friendly ground targets or supporting aircraft (AWACS, Tanker...) will result in disciplinary actions. This includes collisions as well! 4. Players are not allowed to attack enemy CSAR helicopters. Doing so will result in disciplinary action! They will be attacked by AI though. 5. Rescue helicopters are not allowed to attack enemy targets. Doing, so will result in disciplinary actions. 6. A CSAR can transport 2 pilots at a time 7. To pick up a pilot, you do not need to land. The requirements are as follows: - Distance < 100m - Altitude < 10m - Speed < 1m/s How to add it to a mission First of all, you need to have Slmod installed on the hosting machine In the mission editor: Create trigger zones around all FARPs and airbases that you want to allow rescued pilots to be dropped off at and where aircraft can be safely quit. In the script file: You can change the following values: CSARMAXACTIVE = 2 Limits the number of CSAR helicopters active simultaneously CSARRESCUEDISTANCE = 100 Distance in meters around the pilot that a rescue helicopter has to be in for pickup CSARINSIGHTDISTANCE = 3000 Distance in meters that triggers the 'in sight' message CSARMAXAGL = 10 Max AGL for rescue helicopter for pickup CSARMAXSPEED = 1 Max Speed in m/s for pickup CSARFLAREINTVL = 12 Seconds between flares for downed pilots SMOKEINTVL = 270 Seconds between smoke markers for downed pilots NOEJECTPUNISHTIME = 300 Seconds that a slot stays deactivated after being rescued without ejecting CSARATTACKINGPUNISHTIME = 1800 Time a CSAR slot is deducted after a CSAR attacks an enemy target ATTACKCSARPUNISHTIME = 1800 Seconds that a slot stays deactivated after being rescued after attacking an enemy CSAR ATTACKFRIENDLYPUNISHTIME = 900 Seconds that a slot stays deactivated after being rescued after attacking friendly targets UNITSSTARTINGFLAG = 11000 Flags that the script requires will be taken from this flag on. It requires 5 flags per unit that is monitored FLAGALWAYSFALSE = 10999 Flag that is always false MESSAGESOUNDFILE = 'static.ogg' Soundfile that is played when a message comes up Then you need to fill out the table of units that are monitored. 'units' are combat aircraft that are disabled when destroyed -> name = the EXACT name of the group in the mission -> nameLong = how the unit 'refers to itself' -> nameShort = How it will come up in the tasklist -> category = a number, indicates to which airfield the unit belongs. 'csar' are rescue helicopters and can pick up pilots -> name = the EXACT name of the group in the mission -> nameShort = How it will be refered to in tasklist and messages -> rescueLimit = How many pilots can be carried simultaniously 'AIRFIELDS' are the bases of each coalition, and also bases of the enemy coalition that can be captured during the mission -> zone = EXACT name of the triggerzone created for this base -> category = same as for units. if you enter 0 here, every unit can be dropped off here -> capturable = true or false, depending on whether or not the base is an enemy one that can be captured -> flag = if this cannot be captured, enter FLAGALWAYSFALSE here. If it can, enter a flag number that is TRUE when the base is captured by this team and FALSE if it is still enemy Look into the example mission for how to build such a flag if unsure Final Step: Build a trigger: ONCE -> Time More 1 -> Do Script and paste the whole content of the file including the changes you made into the textbox ---------------------------------------------------- Important The release of 1.2.5 broke some functionality of Slmod, in particular the detection of hitting targets. Therefore, the detection of 'players attacking csar helicopters' and 'csar helicopters attacking enemies' does not work until such a time that an update for Slmod is provided. The basic functionality of the script remains untouched Use without warranty A thousand thanks to Grimes and Speed for their work in creating Mist and Slmod :thumbup:DRAGONs_HamburgerHill_V81_csar_v10.zip Edited August 6, 2013 by St3v3f aka: Baron [sIGPIC][/sIGPIC] Link to comment Share on other sites More sharing options...
fangav Posted August 6, 2013 Share Posted August 6, 2013 St3v3f, or anyone else, is there any advantages or disadvantages to using Do Script verses Do Script file? [sIGPIC][/sIGPIC] Link to comment Share on other sites More sharing options...
Grimes Posted August 6, 2013 Share Posted August 6, 2013 Mostly none, but there are slight differences. Do script is arguably better because it adds the lua script directly into the miz file as text. Thus what you see is what you get. Do script file has the very slight chance that when you update it within an existing mission, that the file might not always update. You can try again or import the file directly into the miz, but it is slightly annoying to load into a mission thinking a file was updated but it really wasn't. I tend to use both methods as it really doesn't matter that much and its all personal preference. The right man in the wrong place makes all the difference in the world. Current Projects: Grayflag Server, Scripting Wiki Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread) SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum Link to comment Share on other sites More sharing options...
fangav Posted August 7, 2013 Share Posted August 7, 2013 Cheers Grimes [sIGPIC][/sIGPIC] Link to comment Share on other sites More sharing options...
Midnight Posted January 23, 2014 Share Posted January 23, 2014 Is this still working after the newest 1.2.7 update? Link to comment Share on other sites More sharing options...
St3v3f Posted January 23, 2014 Author Share Posted January 23, 2014 I haven't tried it in 1.2.7 yet but don't see a reason why it shouldn't work. The note regarding Slmod and the 1.2.5 update is still actual though since there hasn't been an update to Slmod. aka: Baron [sIGPIC][/sIGPIC] Link to comment Share on other sites More sharing options...
St3v3f Posted February 8, 2014 Author Share Posted February 8, 2014 Just ran my test mission with DCS 1.2.7 and Mist 3.3, everything seems fine except for the broken SLmod functionality aka: Baron [sIGPIC][/sIGPIC] Link to comment Share on other sites More sharing options...
yallu Posted May 4, 2014 Share Posted May 4, 2014 Looks like 1.2.8 broke this, same for anyone else or is it just me? Link to comment Share on other sites More sharing options...
St3v3f Posted May 5, 2014 Author Share Posted May 5, 2014 I'll check it out tomorrow aka: Baron [sIGPIC][/sIGPIC] Link to comment Share on other sites More sharing options...
St3v3f Posted May 7, 2014 Author Share Posted May 7, 2014 Sorry guys, it'll be a few more days aka: Baron [sIGPIC][/sIGPIC] Link to comment Share on other sites More sharing options...
Patchwork Posted February 3, 2015 Share Posted February 3, 2015 Unfortunately I'm not getting this to work in my own mission, or with the included mission. Link to comment Share on other sites More sharing options...
nickexists Posted February 7, 2015 Share Posted February 7, 2015 Seems like an awesome script. It'd be great to see a version that is a little more readable so that people can fix and adapt it. The fact that it has the entirety of Mist just pasted into makes it a little hard to navigate. Link to comment Share on other sites More sharing options...
pepin1234 Posted July 18, 2016 Share Posted July 18, 2016 This Script still working with current 1.5.4? [sIGPIC][/sIGPIC] Link to comment Share on other sites More sharing options...
Steggles Posted July 18, 2016 Share Posted July 18, 2016 I doubt it. A lot has changed. Checkout ciribob's CSAR script - http://forums.eagle.ru/showthread.php?t=146994 -16AGR- 16th Air Guards Regiment is always looking for pilots - http://www.16agr.com EWRS - Early Warning Radar Script Specs: Gigabyte Sniper Z5-S Intel i5-4670k 3.4GHz OC'd 3.9GHz w/ Thermaltake 120mm Water 3.0 Pro Liquid CPU Cooler 16GB RAM Gigabyte GTX 1080 TM Hotas Warthog: SN: 06976 Saitek Pro Flight Combat Rudder Pedals TrackIR5 with TrackClipPro & Oculus Rift 2x 28" 4k UHD Monitors (3840x2160 each) + 1280x1024 Link to comment Share on other sites More sharing options...
Recommended Posts