Jump to content

Baron's CSAR Script


Recommended Posts

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 by St3v3f

aka: Baron

[sIGPIC][/sIGPIC]

Link to comment
Share on other sites

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: Scripting Wiki, Something...

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread), SLMOD, IADScript, Mission Editing Wiki!, Mission Building Forum

Link to comment
Share on other sites

  • 5 months later...
  • 3 weeks later...
  • 2 months later...
  • 8 months later...
  • 1 year later...

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

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...