-
Notifications
You must be signed in to change notification settings - Fork 738
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Medical - Add Enable Setting #9593
base: master
Are you sure you want to change the base?
Conversation
On a side note, this could be used by Medical AI to implement on-demand healing via the command menu. |
If you first injure a unit, then select said unit using the SL vanilla menu, then press 6 and order the unit to "Treat yourself", the command will be |
We could use waitUntilAndExecute checking for unit starting a healing animation |
Or the AnimChanged and/or AnimStateChanged EH's. |
Return value of HandleHeal is ignored, but AISFinishHeal works
Found a better solution (at least for SP, I can't test in MP atm). |
@LinkIsGrim What do you mean by
|
Any of the vanilla scroll wheel actions that have anything to do with healing (especially those that don't require inventory items) will need to be disabled/hidden whenever medical is enabled, but need to be able to be reenabled without a game restart. |
Do you have any examples of this?
I've been thinking about this for a while. At the moment the AI automatically requests a medic when they are safe and injured:
Medic only heals if he's safe. Trying to overwrite the safe behaviour is imo a bad idea. The only thing you could easily influence is the order of healing of each unit:
When using the command menu, we could insert the unit to be healed at the beginning on the queue, so the to be healed unit would be prioritised. The problem is, I don't know how to edit the command menu options. As it stands, you'll be able to use the "Treat" command once on an injured or medic, then it's removed because the unit in questions doesn't have any vanilla treatment items anymore. We'd need to edit the command menu "Treat" commands to take both Vanilla and ACE medical items into account. EDIT: Looks like we can edit the command menu options easily, but I'm not sure if it will allow us to edit it in the way we need to. |
|
Thanks. I tested and unfortunately At this point I don't know what else to do. Adding https://community.bistudio.com/wiki/Arma_3:_Event_Handlers#AnimChanged EH to every single unit and check if they go into a healing animation wouldn't help, because healing at vehicles remains a problem (maybe the previous method of making the unit leaving the group and rejoining it would work, haven't tested it). I've taken a look at editing the commanding menu and I don't think it's possible to edit it in a way we'd want to. We only get a very limited selection of expressions we can use for the condition (https://community.bistudio.com/wiki/Arma_3:_Communication_Menu#Simple_expressions). I tried to add an |
Actually I do: We ignore it. The current ACE medical system also can't prevent units healing themselves that way.
As far as I'm aware, nothing of the sort remains in the medical system. The command menu is, as far as I can tell, not possible to edit the way we'd need to. |
if !(GETEGVAR(medical,enabled,false)) exitWith { | ||
// Call manually (see CfgFunctions.hpp) | ||
// https://community.bistudio.com/wiki/Arma_3:_Functions_Library#Config_Levels | ||
["postInit", didJIP] spawn BIS_fnc_reviveInit; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Won't this break SOG/Endgame/whatever?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know, it's something to investigate. SOG doesn't seem to set the function to not run in postInit, but it might do something somewhere else.
As it is, it's probably a bad idea, so definitely will need to find a better solution.
When merged this pull request will:
TODO:
IMPORTANT
Component - Add|Fix|Improve|Change|Make|Remove {changes}
.