Jump to content
Spudnut

Prevent death but allow agony state

Recommended Posts

Hello Everyone!

 

Been making some missions for me and my friends on Chernarus and I am using the FIRST AID modules.

 

As the system works currently, sometimes we take non-lethal damage and enter agony, and sometimes we die flat out (then turn into a crow). My desire is to make it to where we never die but still have the ability to receive damage and enter a state of agony.

 

Is there a way to script non lethal damage into the units me and my friends occupy?

 

Thanks for your time guys!

  • Like 1

Share this post


Link to post
Share on other sites
4 minutes ago, Spudnut said:

Hello Everyone!

 

Been making some missions for me and my friends on Chernarus and I am using the FIRST AID modules.

 

As the system works currently, sometimes we take non-lethal damage and enter agony, and sometimes we die flat out (then turn into a crow). My desire is to make it to where we never die but still have the ability to receive damage and enter a state of agony.

 

Is there a way to script non lethal damage into the units me and my friends occupy?

 

Thanks for your time guys!

Hi there! You can enter a state of agony by having a unit do somewhere around .5 - .8 damage... As far as making that a permanent feature i'm not too sure, it might be possible but I believe this would require doing each unit manually and setting them to only deal x amount of damage, however in this case you would need to modify your health too so you never die... There's a great deal of work that would have to go into this and it would be very time consuming for someone to do, not only are you modifying the players health but you're also modifying the damage dealt as well so that way your player never truly "dies"... I wish you luck though! Cheers!

Share this post


Link to post
Share on other sites

Thanks for the fast reply SOCS!

 

Is there a way to put a soldier directly into an agony state via scripting? Perhaps its possible to set respawn for the map to "INSTANT" and then the moment the soldier respawns another script can force them into agony? In essence this would achieve the same outcome I'm looking for.

Share this post


Link to post
Share on other sites
1 hour ago, Spudnut said:

Thanks for the fast reply SOCS!

 

Is there a way to put a soldier directly into an agony state via scripting? Perhaps its possible to set respawn for the map to "INSTANT" and then the moment the soldier respawns another script can force them into agony? In essence this would achieve the same outcome I'm looking for.

Well, you could try setting them into agony by putting this into the init field;

this setDamage .x;

this should allow your unit to start the mission with damage dealt, i'm not the greatest at scripting so bear with me if this doesn't work but ethically it should... However this will only start with damage I would check to see first though before publishing anything... (x represents the amount of damage dealt with upon starting)

I hope this helps! If it does please do let me know, if it doesn't please do let me know also and I could ask around...

@GEORGE FLOROS GR Also might be able to help you with making this continuous and permanent as he's pretty good at scripting! Hope you don't mind me using you as a reference George! Lol, have a good one and hope you find everything you're looking for!

  • Thanks 1

Share this post


Link to post
Share on other sites
21 minutes ago, socs said:

Hope you don't mind me using you as a reference George! Lol,

 

Thank you Socs very much indeed !

 

I also saw this topic and i clicked to follow it .

I would like also to check about it but at the time , i 'm a little bit bussy with a script.

 

 

4 hours ago, Spudnut said:

Is there a way to script

 

There is always a way !

If you want to make a search , what you need is  HandleDamage

https://community.bistudio.com/wiki/Arma_3:_Event_Handlers#HandleDamage

 

 

If i have time i'll check and tell you Spudnut !

 

See you Guys!

  • Thanks 1

Share this post


Link to post
Share on other sites

@Spudnut

 

The "HandleDamage" event handler would be the best way to go, it should be sufficient.  But if not, you could also copy certain of the module scripts and fsm's to your mission folder to modify how they work for your mission.  It would rely on a soft path used by the first aid scripts and fsm's.  In summary:

 

- When the hard path "\ca" is used, the engine only runs core addon scripts.  When you see a soft path "ca" (no beginning backslash) is introduced, the scripts and fsm's using that path can be copied into the mission folder for the mission maker to work with.  The engine first searches the path in the mission folder for the script or fsm.  When not found it defaults back to the module.  So the hard path ensures an addon script or fsm runs without change, the soft path allows mission makers to copy certain ones over into mission folder and change how they work.

 

- Each of the First Aid modules initializes on a hard path.  FA (Action), AIS (Simulation) and BC (Battlefield Clearance) each have their own initializing script ("x_serverStartUsingLogic.sqf" where x_ is the module name FA, AIS or BC).  Copying those scripts to mission folder won't work since the engine runs them from the hard path.

 

- But each of the initializing scripts defines a path for running the remaining scripts and fsm's.  AIS and BC both introduce a soft path for their scripts and fsm's, but the FA module continues to set a hard path.

 

- However, the StartUsingLogic script for AIS does a proxy initializing of FA if not already initialized; and when it does, it introduces a soft path for FA.

 

- So copying FA scripts into the mission folder will work when AIS is used to initialize FA.  You basically leave the Action module (FA) off the map and place the Simulation module (AIS).  The AIS initializes both FA and AIS, both introducing soft path.  Then you can work with both the FA and AIS scripts.

 

BC - soft path,
FA - hard path,
AIS - soft path + initializes FA with soft path.

 

In your mission folder create a folder "ca", and in ca folder create other folders copying the path of the scripts or fsm's you would work with, i.e. "ca\Modules\AIS\data\....".

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

×