Jump to content
Sign in to follow this  
davidoss

Medevac

Recommended Posts

Hi.

I am looking for a script that couldbe making stuff like this:

1. Spawn UH60MEV with crew.

2. Spawn a medic inside that heli.

3.If there is no player near (1000m) uncouncies one heli should takeof and delivery medic to uncouncies player.

4.When player healed doctor should pullback into heli and they should rtb.

Havd anyone of you guys see something like that what i could use?

Sorry for my english.

Share this post


Link to post
Share on other sites

I cant get on arma 3 right now, but I suggest you do this relating to your points:

1. Double-Click on map and place a BLUFOR helicopter located in section "Air" and set it to "Flying", call it heli1.

2. Double-Click on map and place a BLUFOR medic located in section "Men" and name it medic1. In it's init, paste this in:

medic1 moveInCargo heli1;

3. create a "LAND" waypoint for the helicopter FIRST, then create a "GET OUT" waypoint for medic1 at the location where you want him dropped off.

I'm not sure about the heal command as I am on a mobile phone, but after he heals you, do this:

create a "MOVE" waypoint for the helicopter FIRST, then create a "GET IN" waypoint for medic1 attached to the helicopter (the heli will automatically wait)

Share this post


Link to post
Share on other sites

I have been looking for the same thing with no luck. I know that it was available in Arma 2. What I am looking for is a system that when a player is shot he goes unconscious. A transport can then be called in for you to load the player into then RTB. Once at base the player can revive and use the same chopper to come back to the fight. Kind of like getting reinforcements during battle. I would also like the ability to add a medic that I can chose to heal players on the ground then get back in chopper and head back to base.

Share this post


Link to post
Share on other sites

I have found something similiar but its need to be called from another player witch is unusable as there anyone can heal.

This what i need is fully automatically call upon the player/s are uncountious and they need to respawn. A medevac team could prevent that.

Share this post


Link to post
Share on other sites

You might want something along these lines: Place a marker called "Medevac_spawn", or call it whatever you want and change line 3 to reflect that. This isn't final, when you say "unconscious" is that an AGM thing or something, the vanilla game doesn't have that state. Basically at the moment what this is does is spawn a helicopter, a medic and a protection unit. They fly out to near the patient and land, the medic jumps out and goes to the wounded person, the wounded person is healed, the medic and protection unit get back in the helicopter which flys back to where it spawned, lands and then deletes itself. The problem at the moment is the actual healing line, which I can't get to work properly. Aside from that, admittedly fairly crucial part, it works fine.

_unit=_this select 0;
_side=_this select 1;
_marker="Medevac_spawn";
//Spawn helicopter
_type="B_Heli_Transport_01_F";//Change as appropriate
_vehicle=([getMarkerPos _marker,MarkerDir _marker,_type,_side,false] call Bis_fnc_spawnVehicle) select 0;

//Spawn medic+protection unit
_medType="B_medic_F";
_proType="B_Soldier_F";
_grp=createGroup _side;
_medic=_grp createUnit ["B_medic_F",getMarkerPos _marker, [], 0, ""];
_protection=_grp createUnit ["B_Soldier_F",getMarkerPos _marker,[],0,""];
[_medic,_protection] joinSilent _grp;//Apparently needed in case createUnit doesn't work properly
{_x moveInCargo _vehicle} forEach [_medic,_protection];

//Find LZ near player
_pos0=[getPos _unit,0,50,5,0,10,0] call Bis_fnc_findSafePos;//Having a nightmare with this, you may want to adjust the values a bit.
//Create helipad
_pad = createVehicle ["Land_HelipadEmpty_F", _pos0, [], 0, "NONE"];

//Create waypoint
_wp0=(group _vehicle) addWaypoint [_pos0,0];
_wp0 setWaypointType "TR UNLOAD";
_wp0 setWaypointStatements ["true","(vehicle this) land 'land'"];
waitUntil {isTouchingGround _vehicle};

{_x action ["GetOut",_vehicle]} forEach [_medic,_protection];//Kick medic and protection out
(driver _vehicle) disableAI "move";//Prevent the helicopter taking off again
_wpMed=_grp addWaypoint [getPos _unit,0];
_wpMed setWaypointStatements ["true","_unit action ['Heal',this]"];//The problem line, have to do some checking
waitUntil {damage _unit < 0.3;};//Normal FAK heal to 75% so include a bit of leeway
_wpLoad=_grp addWaypoint [getPos _vehicle,0];
_wpLoad waypointAttachVehicle _vehicle;
_wpLoad setWaypointType "GetIn";
waitUntil {(_medic in _vehicle || !alive _medic) && (_protection in _vehicle || !alive _protection)};

//Create pad at destination
_pad = createVehicle ["Land_HelipadEmpty_F", getMarkerPos _marker, [], 0, "NONE"];

//Make helicopter leave and delete landing pad
deleteVehicle _pad;
(driver _vehicle) enableAI "Move";
_wp1=(group _vehicle) addWaypoint [getMarkerPos _marker,0];
_wp1 setWaypointStatements ["true","(vehicle this) land 'land'"];
waitUntil {!isTouchingGround _vehicle};//Make sure the script halts until it takes off
waitUntil {isTouchingGround _vehicle;};//Wait until it has landed
_vehicle engineOn false;//Turn the engine off
sleep 10;//Wait a little bit
deleteVehicle _pad;
{deleteVehicle _x} forEach crew _vehicle+[_vehicle];//Delete crew/cargo/helicopter

Share this post


Link to post
Share on other sites

Awesome. You wrote a script. Why not if you can...

Yes i have forgot to give that this is going about AGM where:

_medic setVariable ["AGM_IsMedic", true];

making _medic doing his job automatically if is inside group of wounded player/unit.

The same is with define lifestate of player:

if (AGM_player getVariable ["AGM_isUnconscious", False]) then {};

But there should be more statements one for sure:

Do nothing if there are other alive/!(AGM_isUnconscious) players/medic_unit near unconscious soldier.

And something for heli when is on the way.

{_vehicle disableAI _x} forEach ["Target", "Autotarget"];
_vehicle setBehaviour "CARELESS";
_vehicle setVariable ["AGM_IsMedic", true]; //vehicles can have this variable too.

Here is the magic stuff executed by ai treatment:

https://github.com/KoffeinFlummi/AGM/blob/master/AGM_Medical/functions/fn_aiTreat.sqf

Can you please go further with that?

Many thanks.

Edited by DaVIdoSS

Share this post


Link to post
Share on other sites
Awesome. You wrote a script. Why not if you can...

Yes i have forgot to give that this is going about AGM where:

_medic setVariable ["AGM_IsMedic", true];

making _medic doing his job automatically if is inside group of wounded player/unit.

The same is with define lifestate of player:

if (AGM_player getVariable ["AGM_isUnconscious", False]) then {};

But there should be more statements one for sure:

Do nothing if there are other alive/!(AGM_isUnconscious) players/medic_unit near unconscious soldier.

And something for heli when is on the way.

{this disableAI _x} forEach ["Target", "Autotarget"];
this setBehaviour "CARELESS";
this setVariable ["AGM_IsMedic", true]; //vehicle can have this variable too.

Can you please go further with that?

Many thanks.

I'll have a play this evening, I need to stop procrastinating on the internet right now. :D

Share this post


Link to post
Share on other sites

Anyone have a vanilla version of this or any medivac script that works in MP? would be very cool to call in heli and have crew pick up wounded and evac to base to revive/ reheal. Something a bit different than in field medic and 100% revive.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×