Jump to content
Sign in to follow this  
cc_kronus

Heal or Eject cargo players from ALiVE helicopter for ACE3 healing [solved]

Recommended Posts

Hi

 

we play in a group using ACE3 and ALiVE,    
 

Sometimes someone is badly hit, he is in stable conditions but still do not recover the conscience and the medic has run out of Personal Aid Kits or Saline bags to fully recover the player.  We want to call a medevac (generated by ALiVE, so the chopper does not have a "name" we could use), evacuate the casualty to base, and as soon as the medevac chopper helicopter lands in the medic helipad, cure the injured running a function. 

 

in the code that is ran on the Alive Helicopter is :  this setVariable ["ACE_isMedicalVehicle", 1, true]; so the injured stops bleeding.

 

the trigger at the helipad has the following condition

 

 _x isKindOf "air" && isTouchingGround _x  && player in thislist

 

and on activation :

 

{[_caller, _target] remoteExecCall ["ACE_medical_fnc_treatmentAdvanced_fullHealLocal", _x, false];} forEach thisList;

 

Well, we have been unable to make it work and heal people inside the chopper. 

 

For example, changing condition to "this" allows anyone who gets out of the chopper and step on  the helipad (where the trigger is)  to get instantly healed.

 

The problem is that most of the guys in the helo are usually unconscious, therefore, are unable to make any action to get out. or use an "addaction" which would solve the problem.  We thought: wait a minute, if we kick them out of the chopper and fall on the helipad they will be instantly cured! 

 

so we have tried adding another trigger on top of the healing one to eject players out fo the chopper, but it does not work. 

 

We have tried with Getout:   unit action ["getOut", targetVehicle]   

we have tried with eject: unit action ["eject", vehicle]

none worked, we assume that the problem was that the players in the back of the chooper count as cargo, 

 

Please, Note that we are playing with an helicopter generated by ALiVE, so it has no name to refer to, and ACE3, so solutions such as "set damage 0" will not work.

 

Any idea how to solve this?   Either healing them when the chopper lands on the helipad or alternatively, with another trigger to kick players out of the chopper after landing so they fall on the helipad. 

 

The trigger must work in multiplayer, either on dedicated servers or on hosted server. 

 

Our programming skills are very limited, so if you post a solution that we can just copy and paste it would be greatly appreciated. 

 

Thanks in advance for your help.

 

 

 

 

 

Share this post


Link to post
Share on other sites

The way is as follows:

 

 

step 1.  Trigger at helipad  (for ACE3 healing)

 

10x10 square. 

type: none

activation: anyplayer

activation type: present

repeatable

condition: Player in thislist;

On Activation: {hint "You are now healed"; [_x, _x] remoteExecCall ["ACE_medical_fnc_treatmentAdvanced_fullHealLocal", _x, false];} forEach thislist;

 

 

step 2.  The Helicopter  (For ALiVE system).

 

a) For whatever reason, I could not make it work with a chopper created with the transport module, consequently I had to put a medevac helicopter with Eden the normal way you put things in the scenario.

b) syncronize the helicopter with  Alive's  PLAYER COMBAT SUPPORT MODULE. 

c) Enter this in the init of the helicopter:

 

this addEventHandler [ 
 "Engine",  
 {  
  params ["_vehicle", "_engineOn"]; 
  if( !_engineOn ) then { 
   private _pilotGroup = group driver _vehicle; 
   {  
    if( group _x != _pilotGroup ) then { moveOut _x };  
   } forEach crew _vehicle; 
  }; 
 } 
];

this setvariable ["CS_TYPE","transport"];  

this setvariable ["CS_CALLSIGN","yourcallsign here"];

this setVariable ["CS_SLINGLOADING", false];

this setVariable ["CS_CONTAINERS",0];

 

The helicopter only switches engine off when it arrives back to base, so that is when the eventhandler will  be activated, will do the check on the crew and kick players out of the chopper.  The  lines with "this setvariable" are to enable ALiVE to recognize the helicopter and enable it in the Player Combat Support Module

 

How does it work?

Whenever you have in your team an injured that is stable but inconscious and in comatose state and the team medic is out of personal aid kits or enough fluids to bring the man back, it is evident that the player needs to be evacuated.  Call the medevac chopper through ALiVE , load the unconscious man on the helicopter and send the chopper back to base.  As soon as the helicopter touches ground on its helipad  (can be a medic helipad next to a medic facility for inmersion) the eventhandler in the chopper will eject the player and when he touches the helipad the trigger will instantly heal the player.

 

How you reinsert (or not!)  the player back to the combat zone is up to the custom procedures of how each group of players/units operate. 

 

Thanks to The Magnetar for the trigger and to MrCurry for the Eventhandler.

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  

×