Jump to content

Dynamic Medevac Script


Recommended Posts

@ 'shagrat' → (...)

"... The coordinates can be switched in the scripts header section. Look

for MGRS..."

Sorry, am not familiar with scripts and how to change them....

 

Thanks all for your help... much appreciated!!

 

It's actually quite simple: the .lua file is a text file.

Best download Notepad++ to open lua files. Only use Windows Editor if absolutely necessary (sometimes Editor messes up things).

 

At the start of the file is a section where you may change variables (it is explained in the script what each variable is used for)

Example (don't know the exact variables now, but you will recognize it) "medevac.rescuecoordinates = 1" now in that line after the -- is explained that a value of "4" gives you "MGRS" instead of "bullseye" calls.

 

The line will then read "medevac.rescuecoordinates = 4" --<explanation how to change>

 

Now save the file (new name with save as, is advisable in case you want a fallback).

Open the mission, change the load script trigger to the new file and try the changes...

 

As long as you keep the original script file you can't really mess up. It is not as complicated as it seems. :thumbup:


Edited by shagrat

Shagrat

 

- Flying Sims since 1984 -:pilotfly:

Win 10 | i5 10600K@4.1GHz | 64GB | GeForce RTX 3090 - Asus VG34VQL1B  | TrackIR5 | Simshaker & Jetseat | VPForce Rhino Base & VIRPIL T50 CM2 Stick on 200mm curved extension | VIRPIL T50 CM2 Throttle | VPC Rotor TCS Plus/Apache64 Grip | MFG Crosswind Rudder Pedals | WW Top Gun MIP | a hand made AHCP | 2x Elgato StreamDeck (Buttons galore)

Link to comment
Share on other sites

Does this script use smoke and flare when you get closer as the CSAR script uses?

 

Smoke

 

trigger.action.smoke(Vec3 point, enum trigger.smokeColor color)}

 

 

 

Flare

 

trigger.action.signalFlare(Vec3 point, enum trigger.flareColor color, Azimuth azimuth)

 

 

 

Illumination bomb

 

trigger.action.illuminationBomb(Vec3 point)

 

 

 

Also, it would be awesome to use the FM radio to identify the area we need to get to instead of using the F10 map for Bullseye or BRA, there's a way with DCS scripting -

 

trigger.action.radioTransmission(string fileName, Vec3 point, enum radio.modulation modulation, boolean loop, number frequency, number power)

 

 

I was planning to add these features eventually (or maybe someone else could?). The problem with the radio transmission is that the mission designer needs to do the extra step of injecting the sound file. Also, IIRC when I looked into it way back this feature was bugged in DCS.

DCS AJS37 HACKERMAN

 

There will always be bugs. If everything is a priority nothing is.

Link to comment
Share on other sites

  • 2 weeks later...

Hey there, RagnarDa

 

Been trying to merge your script into a mission template I have been putting together and I can seem to get it to work. Keep getting the error that it can't find the BlueMASH unit.

Currently running the official 1.27 build, latest patch and the scripts I am attempting to include with it are Grimes IAD script, as well as the Flak Script by sith, the smart SAM script, and a couple others.

Now have looked at your Miz file you included with the script and I have named everything along the same guidelines as your miz file setting.

The Blue and Red mashes are elaborately set up with multiple objects and units at each, but the trigger units are solo.

Any suggestions or thoughts as to why it is rejecting the units?

Link to comment
Share on other sites

Are you absolutely sure the blue mash is named exactly the same as stated in the header of the medevac script file? And that it is a alive ground unit and nothing else? Also try deleting the trigger loading the script and adding it again.

 

Hope this helps!

DCS AJS37 HACKERMAN

 

There will always be bugs. If everything is a priority nothing is.

Link to comment
Share on other sites

Blue Mash not found..

 

Are you absolutely sure the blue mash is named exactly the same as stated in the header of the medevac script file? And that it is a alive ground unit and nothing else? Also try deleting the trigger loading the script and adding it again.

 

Hope this helps!

 

I still be getting the same error, if I send it to you think you could have a look at the miz file and see what I might be doing wrong?

Link to comment
Share on other sites

Ragnar,

 

Finally managed to get it all working now. Ended up having make a set of new mash locations with only a single controlling unit for each. Now with it seeing the mash units, have a new question for you in regards to the medevacs. You happen to know if the Huey is the only one coded to do medevac evacuations, or is any utility helicopter able, primarily does the hip share the same required coding.

Link to comment
Share on other sites

Ragnar,

 

Finally managed to get it all working now. Ended up having make a set of new mash locations with only a single controlling unit for each. Now with it seeing the mash units, have a new question for you in regards to the medevacs. You happen to know if the Huey is the only one coded to do medevac evacuations, or is any utility helicopter able, primarily does the hip share the same required coding.

Why don't you try it out yourself? ;)

 

Also (hint):

 

 

bmp-1-ambulance-01.png

 

Hospital-ship-USNS-Mercy.jpg

 

DCS AJS37 HACKERMAN

 

There will always be bugs. If everything is a priority nothing is.

Link to comment
Share on other sites

Hey Ragnar,

 

 

 

Any chance to add beacons for all the downed pilots and include the freq once you open the -stl and select which pilot you want to try and rescue?

 

 

Adding to the answer I gave you 1,5 week ago: It's on my to-do list when I have some spare-time, but it's a long list and this isn't necessarily on the top of it. ;)

 

Meanwhile, I believe the CTTS-script has a pretty straightforward way of generating homing-beacons, you might want to have a look?

 

Edit: Somewhere around line 1000 in my script is a probably a good place to add stuff... And line 373 onwards too.


Edited by RagnarDa

DCS AJS37 HACKERMAN

 

There will always be bugs. If everything is a priority nothing is.

Link to comment
Share on other sites

RagnarDa,

please, can You add the coordinates to the message " .... pilot dead"?

I use Medevac and CTTS scripts in autogenerated missions, where the context changes very quickly.

To know that a certain pilot is dead (when there are many other pilots downed) it's not useful for my rescue purpose.

Thank you for attention.

antonio.

Link to comment
Share on other sites

RagnarDa,

please, can You add the coordinates to the message " .... pilot dead"?

I use Medevac and CTTS scripts in autogenerated missions, where the context changes very quickly.

To know that a certain pilot is dead (when there are many other pilots downed) it's not useful for my rescue purpose.

Thank you for attention.

antonio.

Are you aware that there is a radio F10 option to see active (not dead) rescue requests?

DCS AJS37 HACKERMAN

 

There will always be bugs. If everything is a priority nothing is.

Link to comment
Share on other sites

Thanks for the script Ragnar.... now that we have a boat load of TF51 pilots popping up... I wonder if we can designate the TF51 to pick up units in its jump seat?

 

might make a fun SAR slot in the p-51 missions. Any known restriction I should be aware of before designating a TF-51 as a Medevac unit?

ASUS Tuf Gaming Pro x570 / AMD Ryzen 7 5800X @ 3.8 / XFX Radeon 6900 XT / 64 GB DDR4 3200 

"This was not in the Manual I did not read", cried the Noob" - BMBM, WWIIOL

Link to comment
Share on other sites

+1, RagnarDa. I had a great time flying as a medevac on Eno's server, though I wasn't as busy as I could have been because the blasted A-10 drivers were just too skillful.:D

 

Here are some recommended additional features (whenever you get the time; you obviously have a long list of things already):

 

  • For bleed-out time, allow for a random timeframe or range so that people don't always have the "same injury." Either a min/max range to be set in the script, or a series of ranges based on "stable" (no timer), "serious", or "critical".
  • Optional: since you don't want to destroy a unit that bleeds out before it is rescued, perhaps apply greater odds of a critical injury the longer the medevac request is queued without pickup.
  • Have downed pilots less likely to be serious or critical (they're more likely to be a CSAR than medevac)
  • Have downed pilots pop flares instead of smoke when you get nearby.
  • Have an option of the medevac position be a range and bearing from the nearest MASH so that we don't have to use the F10 view as much (I tend not to use the view since it is difficult with my multi-monitor setup).

I also second the recommendation for the FM beacon. That would be an amazing feature.

 

 

Thanks again for a great script that adds a lot to DCS! :thumbup:

Link to comment
Share on other sites

Thanks!

 

@Doom: No, I don't think there would be any problem. Also, I believe the Carl Vinson supposedly has a pretty large clinic (who knew?) ;)

DCS AJS37 HACKERMAN

 

There will always be bugs. If everything is a priority nothing is.

Link to comment
Share on other sites

Thanks for the input everyone! Sorry if I can't implement all these great suggestions because of RL-stuff, and the fact that I have kind of moved on to other projects. It's always more fun with the new stuff (this script is one year old! Time flies.). Besides, and most importantly, I see other people are in a position to take over this, and I would be really happy if you did!

DCS AJS37 HACKERMAN

 

There will always be bugs. If everything is a priority nothing is.

Link to comment
Share on other sites

Confirmed working with two sweater tf51

ASUS Tuf Gaming Pro x570 / AMD Ryzen 7 5800X @ 3.8 / XFX Radeon 6900 XT / 64 GB DDR4 3200 

"This was not in the Manual I did not read", cried the Noob" - BMBM, WWIIOL

Link to comment
Share on other sites

  • 1 month later...
Sorry if I missed this somewhere- but do the revived clones show up back in their original location? I can't test since I don't have the chopper modules...

 

 

Yes. And you can test with any module, not just the helicopters...

  • Like 1

DCS AJS37 HACKERMAN

 

There will always be bugs. If everything is a priority nothing is.

Link to comment
Share on other sites

Sorry Rag... one more thing. I think we talked about using invisible instead of immortal awhile ago but I don't know that I ever moved on it. Just for snits and jiggles- would all I need to do to this:

 

-- Immortal code for alexej21

local _SetImmortal = {

id = 'SetImmortal',

params = {

value = true

}

}

 

Is change the _setImmortal to _setInvisible on both of those?

"ENO"

Type in anger and you will make the greatest post you will ever regret.

 

"Sweetest's" Military Aviation Art

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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