Jump to content
Sign in to follow this  
Selkan

Give ACE medical a "third stage" between Alive and Cardiac arrest

Recommended Posts

As the titel says, is their something in the community that makes so that ACE Medical have a third stage What i want to do is have if players take a certain amount of damage they behave like they are unconscious, they can't move and just lay on the ground but they don't have cardiac arrest. They will just lay and bleed out if they don't get treatment and enter cardiac arrest. So i want players to behave like they are wounded and lay on the ground screaming and getting treatment and all the role play that come's with it.     

Share this post


Link to post
Share on other sites

You probably need to hook into a few ace events if you really want to do something like this.

 

First up you probably want to hook into the CBA event "ace_cardiacArrestEntered" as this is the event which is triggered if a unit enters cardiac arrest. From there you have to handle internally if the unit is to enter cardiac arrest or not.

When a unit enters cardiac arrest they will also enter the unconscious ace state, so you could also use the cba event "ace_unconscious" somehow.

 

So as doing:

unit enters cardiac arrest -> check if that is alright or if you want your third stage to happen first.

if it is the third stage then get the unit out of cardiac arrest. That means pump up the heat rate above 20.

A unit will be unconscious if the heart rate is below 10, blood pressure H is below 30 and the overall blood volume is below 60% (it is actually a 10 % chance each tick to happen). 

A unit will stay unconscious if the blood voume is below 65%, pain index is above 0.9, is bleeding 0.25 or more, is in "revive state", is in cardiac arrest or is simply "dead".

Get the unit out of cardiac arrest by setting variables on the unit 

  • ace_medical_inCardiacArrest -> nil
  • ace_medical_heartrate -> 40
  • ace_medical_bloodPressure -> [50,70]

Get them out of unconscious state with [_unit, false] call ace_medical_fnc_setUnconscious; (this does not mean unit will just flop back to being unconscious immidiately!)

 

Here you want the event of the unit being on the floor yelling around or something. There are some animations you can use for that. Keep in mind a player is then actually awake and could just cheat and use ace's headbug fix.

 

 

Hope this gave you some general idea how it could be implemented. I doubt there is an implemented solution for this already somewhere released.

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

×