Jump to content

Dynamic Medevac Script


Recommended Posts

  • 2 years later...

Thank you RagnarDa/Cribob for this awesome script - It has finally got me into playing with scripts in the ME!

 

 

 

As this is my first dabble in scripting may I ask a very 'noob' question - when distributing this .miz file do you need to include anything other than the .miz file? As in, do you need to include your edited script .lua?

 

 

Thanks

F-15E | AH-64 | F/A-18C | F-14B | A-10C | UH-1H | Mi-8MTV2 | Ka-50 | SA342 | Super Carrier | Nevada | Persian Gulf | Syria |

Intel Core i7 11700K - 32GB 3200MHz CL16 DDR4 - MSI GeForce RTX 3060 Gaming X 12GB - Samsung 970 EVO Plus NVMe SSD 1TB

Link to comment
Share on other sites

Thank you RagnarDa/Cribob for this awesome script - It has finally got me into playing with scripts in the ME!

 

 

 

As this is my first dabble in scripting may I ask a very 'noob' question - when distributing this .miz file do you need to include anything other than the .miz file? As in, do you need to include your edited script .lua?

 

 

Thanks

 

No, if the script is loaded via the triggers and it works in your test playing it works. The Miz contains all scripts and stuff.

Shagrat

 

- Flying Sims since 1984 -:pilotfly:

Win 10 | i5 10600K@4.1GHz | 64GB | GeForce RTX 3090 - Asus VG34VQL1B  | TrackIR5 | Simshaker & Jetseat | VIRPIL CM 50 Stick & 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

Thanks Shagrat! :idiot:

F-15E | AH-64 | F/A-18C | F-14B | A-10C | UH-1H | Mi-8MTV2 | Ka-50 | SA342 | Super Carrier | Nevada | Persian Gulf | Syria |

Intel Core i7 11700K - 32GB 3200MHz CL16 DDR4 - MSI GeForce RTX 3060 Gaming X 12GB - Samsung 970 EVO Plus NVMe SSD 1TB

Link to comment
Share on other sites

Pilot Mod

 

Just wanted to throw this out there.

IF you are using the Infantry Unit-Animated Pilot Mod by SUNTSAG https://forums.eagle.ru/showthread.php?t=229788 and were to change "Soldier M4" and /or "Infantry AK" to "PilotMod"

starting at line 386 in the Medevac Script

   if _isPilot then

       if _side == 2 then
           _group.units[1] = medevac.createUnit(_pos.x + 50, _pos.z + 50, 120, "[color="Red"]PilotMod[/color]")
       else
           _group.units[1] = medevac.createUnit(_pos.x + 50, _pos.z + 50, 120, "Infantry AK")
       end

 

Then your down pilots will look like...Pilots :pilotfly:

In limited testing, I have had no problems with it on current OB release and works just fine.

Link to comment
Share on other sites

  • 4 weeks later...

Just a question of curiosity.

 

 

Exactly where to I find the files mentioned in the following steps, they are not listed to be downloaded as far as I can tell - Thank you.

 

 

6. Click the rightmost New and change it to Do script file and click open and select Mistv3_x.lua 7. Repeat 4-6 but set time to 4 sec and select Medevac.lua instead.

PC: Good enough for running DCS flawlessly on high end settings :thumbup:

 

 

Thrustmaster Warthog Hotas

Slaw Device Rudder Pedals

Trackhat Headtracker

Link to comment
Share on other sites

Download the latest MIST script. It's also a good idea to understand what MIST is and does for DCS.

 

https://forums.eagle.ru/showthread.php?p=1622303

Shagrat

 

- Flying Sims since 1984 -:pilotfly:

Win 10 | i5 10600K@4.1GHz | 64GB | GeForce RTX 3090 - Asus VG34VQL1B  | TrackIR5 | Simshaker & Jetseat | VIRPIL CM 50 Stick & 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

Download the latest MIST script. It's also a good idea to understand what MIST is and does for DCS.

 

https://forums.eagle.ru/showthread.php?p=1622303

 

 

Thank you Shagrat for your reply, much appriciated o7

PC: Good enough for running DCS flawlessly on high end settings :thumbup:

 

 

Thrustmaster Warthog Hotas

Slaw Device Rudder Pedals

Trackhat Headtracker

Link to comment
Share on other sites

One question. I am building a medevac mission in Vegas and the idea is to drop off all patients on a helipad on top of a hospital that ive placed.

 

 

Problem is that the BlueMASH only recognizes my presence if I am landing directly on the ground. But not on the helipad on the hospital roof.

 

 

Is there a way to adjust this? :music_whistling:

PC: Good enough for running DCS flawlessly on high end settings :thumbup:

 

 

Thrustmaster Warthog Hotas

Slaw Device Rudder Pedals

Trackhat Headtracker

Link to comment
Share on other sites

One question. I am building a medevac mission in Vegas and the idea is to drop off all patients on a helipad on top of a hospital that ive placed.

 

 

Problem is that the BlueMASH only recognizes my presence if I am landing directly on the ground. But not on the helipad on the hospital roof.

 

 

Is there a way to adjust this? :music_whistling:

That would require adjusting the height check in the script. If you have some Lua knowledge look for the function, handling the landing checks. Maybe I can have a look at it in the weekend, but no promises.

Shagrat

 

- Flying Sims since 1984 -:pilotfly:

Win 10 | i5 10600K@4.1GHz | 64GB | GeForce RTX 3090 - Asus VG34VQL1B  | TrackIR5 | Simshaker & Jetseat | VIRPIL CM 50 Stick & 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

That would require adjusting the height check in the script. If you have some Lua knowledge look for the function, handling the landing checks. Maybe I can have a look at it in the weekend, but no promises.

 

 

Hey Shagrat, I suspected it would be something in terms of that. Thank you for replying :) I am quite rookie tbh but I can't help myself to dig into it and try to understand how it works. No need for promises mate, appriciate the gesture thou nonetheless :thumbup:

PC: Good enough for running DCS flawlessly on high end settings :thumbup:

 

 

Thrustmaster Warthog Hotas

Slaw Device Rudder Pedals

Trackhat Headtracker

Link to comment
Share on other sites

That would require adjusting the height check in the script. If you have some Lua knowledge look for the function, handling the landing checks. Maybe I can have a look at it in the weekend, but no promises.

 

 

Question: I realized after some playing about that I was using one of the early version of the medevac.lua file.

 

 

I downloaded this instead and replaced the medevac.lua file in the mission with this one: https://github.com/RagnarDa/DCS-Mission-Scripts/tree/master/Medevac

 

 

And also downloaded the following mist file: https://github.com/mrSkortch/MissionScriptingTools/blob/master/mist_4_3_74.lua

 

 

Problem is that after using those i get script error window popups.

 

 

Mist version 3.* is supposed to be used with the 4.2 medevac lua file version, but its strange why those script errors popup... Suggestions?

PC: Good enough for running DCS flawlessly on high end settings :thumbup:

 

 

Thrustmaster Warthog Hotas

Slaw Device Rudder Pedals

Trackhat Headtracker

Link to comment
Share on other sites

Question: I realized after some playing about that I was using one of the early version of the medevac.lua file.

 

 

I downloaded this instead and replaced the medevac.lua file in the mission with this one: https://github.com/RagnarDa/DCS-Mission-Scripts/tree/master/Medevac

 

 

And also downloaded the following mist file: https://github.com/mrSkortch/MissionScriptingTools/blob/master/mist_4_3_74.lua

 

 

Problem is that after using those i get script error window popups.

 

 

Mist version 3.* is supposed to be used with the 4.2 medevac lua file version, but its strange why those script errors popup... Suggestions?

Not without the log or details about the script errors popping up...

I need to check my last version, with latest MIST. If it works, I'll upload it here.

  • Like 1

Shagrat

 

- Flying Sims since 1984 -:pilotfly:

Win 10 | i5 10600K@4.1GHz | 64GB | GeForce RTX 3090 - Asus VG34VQL1B  | TrackIR5 | Simshaker & Jetseat | VIRPIL CM 50 Stick & 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

Not without the log or details about the script errors popping up...

I need to check my last version, with latest MIST. If it works, I'll upload it here.

 

 

Much appriciated :thumbup:

PC: Good enough for running DCS flawlessly on high end settings :thumbup:

 

 

Thrustmaster Warthog Hotas

Slaw Device Rudder Pedals

Trackhat Headtracker

Link to comment
Share on other sites

Not without the log or details about the script errors popping up...

I need to check my last version, with latest MIST. If it works, I'll upload it here.

 

 

Update: I was testing the mission from editor - hence why I didnt see any real popup message. I tried to run it from multiplayer server hosting and then the message came up. Problem was that I hadn't placed a RedMASH unit.

 

 

I created a new mission and tested and no script error has popped up now that I have both RedMASH and BlueMASH present :music_whistling:

PC: Good enough for running DCS flawlessly on high end settings :thumbup:

 

 

Thrustmaster Warthog Hotas

Slaw Device Rudder Pedals

Trackhat Headtracker

Link to comment
Share on other sites

Update: I was testing the mission from editor - hence why I didnt see any real popup message. I tried to run it from multiplayer server hosting and then the message came up. Problem was that I hadn't placed a RedMASH unit.

 

 

I created a new mission and tested and no script error has popped up now that I have both RedMASH and BlueMASH present :music_whistling:

Ah, I remember... had that issue myself, when first adapting it into a mission. :)

Shagrat

 

- Flying Sims since 1984 -:pilotfly:

Win 10 | i5 10600K@4.1GHz | 64GB | GeForce RTX 3090 - Asus VG34VQL1B  | TrackIR5 | Simshaker & Jetseat | VIRPIL CM 50 Stick & 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

Ah, I remember... had that issue myself, when first adapting it into a mission. :)

 

 

This is whats fun about it, you learn as you go along ^^

Heres a preview of what I am working on atm. Foundation is almost done. Next up is some trigger conditions to put in place to trigger soldiers for pickup to emerge :thumbup:

 

 

 

y06JSCu.jpg

PC: Good enough for running DCS flawlessly on high end settings :thumbup:

 

 

Thrustmaster Warthog Hotas

Slaw Device Rudder Pedals

Trackhat Headtracker

Link to comment
Share on other sites

Update on the matter of BlueMASH units not recognizing the player when landing on a rooftop. The issue at hand is that recognition is bound to touching down on ground, not buildings.

 

 

Thanks to Shagrat giving helpful input I modified the following line:

 

 

if (_medspeed < 1 and _distance < 200 and _medevacunit:inAir() == false) then

 

 

to:

 

 

if (_medspeed < 1 and _distance < 200 ) then

 

 

The modification worked which makes it possible to land above ground level and still get recognized as present.

 

 

Some pictures: https://imgur.com/a/t92HTtV

PC: Good enough for running DCS flawlessly on high end settings :thumbup:

 

 

Thrustmaster Warthog Hotas

Slaw Device Rudder Pedals

Trackhat Headtracker

Link to comment
Share on other sites

  • 3 months later...
  • 1 month later...

The issue of saving pilots from the sea I think I solved by rewriting the Csar file.

There is only one drawback to this solution that you have to have separate sea rescue units, eg frigates.

"MEDEVAC_SEA #1" e.t.c

He takes a survivor from this altitude:

Screen_190731_182850.thumb.png.00ec861a1d40cbfdcb4e80b842a66839.png

 

This has already been tested on the server and works.

If you are interested, I will send the converted file.

Specialization A-10C

https://vbw304.pl/

Link to comment
Share on other sites

The issue of saving pilots from the sea I think I solved by rewriting the Csar file.

There is only one drawback to this solution that you have to have separate sea rescue units, eg frigates.

"MEDEVAC_SEA #1" e.t.c

He takes a survivor from this altitude:

[ATTACH]214783[/ATTACH]

 

This has already been tested on the server and works.

If you are interested, I will send the converted file.

Please upload it here or in the user files section on digitalcombatsimulator.com.

That way others can use it as well and we can add your changes to the overall script. :)

Just add yourself to the credits on top of the script...

Shagrat

 

- Flying Sims since 1984 -:pilotfly:

Win 10 | i5 10600K@4.1GHz | 64GB | GeForce RTX 3090 - Asus VG34VQL1B  | TrackIR5 | Simshaker & Jetseat | VIRPIL CM 50 Stick & 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

  • 4 weeks later...

Thanks for the excellent script.

Im having a problem when I add it into my training map. Do i need to add something to get the convoy guys to respawn as wounded? So far all Im getting is dead troops....no wounded to medevac...no messages to my Huey(which is expected considering they are dead). What am I missing. The demo version works fine for me so im missing something somewhere. I added the Farp as BlueMash #1 and the medevac as MEDEVAC#1 (copy and Paste). Do i need to do something with the convoy troops to make them respawn that Im missing?

Thanks for your help

 

Edit: Ive read through all 38 pages of posts....I had the wounded invisible, Ive added and changed names, Made them immortal/not immortal. My issue is that the script is not running at all, im sure. problem is that this script is part of a much bigger mission with everything I can think of in it...from a PVP/PVE arena to attacking ships with JSOWS. I feel like my whole attempt at mission making is amateurish because I dont have a background in any type of coding but Im trying. Id like to post the whole mission here for someone..anyone to look at and tell me where its wrong as far as this script. Maybe someone could look the whole thing over and give me feedback? You guys are really good at this stuff and Im just a newb so I feel pretty lost. Any help is appreciated.

TAW Battleground 2.5 .miz


Edited by Andy2828
Lost!!
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...