Jump to content
avibird 1

how do you remove a units name from team switch menu if the unit is unconscious.

Recommended Posts

Ok I need some help on this. I know it can be done but no clue how. I used it in someone's mission a while ago. When a unit goes unconscious how do you remove his name from the team switch menu and then have it added back when the unit is conscious damage set to 0 again.

 

I am currently using BTC quick revive with a system setup that the unit will never die when unconscious even under water and when the unit gets revived all good you can team switch back into the unit without issues. When the unit is on the ground unconscious you can team switch into the unit and the unit will not die the BTC script kicks in. The unit can still crawl a little however when you team switch into a unit under the water the unit will die. If you just revive the unit with divers the unit will be healed and start to swing up and then you can team switch into that unit all is good.

Share this post


Link to post
Share on other sites

in hd.sqf at beginning of the code

 

if (isAbleToBreathe _unit) then { } else {_unit setOxygenRemaining 1;removeSwitchableUnit   _unit;};
 

and then in unc.sqf  here in this bit of code

 

if (Alive _unit) then
{
    if (!_isPlayer) then {{_unit enableAI _x} foreach ["TARGET","AUTOTARGET","MOVE","ANIM"];};
    _unit playMoveNow "AmovPpneMstpSnonWnonDnon_healed";
    _unit setCaptive false;

addSwitchableUnit  _unit;
};

 

 

Not sure it works in MP, there is also setplayable but reading this it says it no longer works and I don't see a way to remove it.

https://community.bistudio.com/wiki/setPlayable

Share this post


Link to post
Share on other sites

Hey f2k sel no luck with the add/remove SwitchableUnit  commands does not work. The units don' t die if you don't attempt to team switch into then before they get revived. Funny thing the player can not revive the units under the water only the AI can and it takes a few minutes for them to act.

 

There must be a way to have them drop off the menu and added back ?

The units don't show damage at first you must have them report status check before the damage shows up on the unit icon.

 

It's playable but  I would like to get it right B)  Thank you for the help.  I don't know why bohemia took out the old ARMA2 medical modules and the ability to not have the units die only stay unconscious. The end game revive is very basic I check it out.

Share this post


Link to post
Share on other sites

Is that in MP or single player?

The dying part has to do with the script, it doesn't happen if I just use a handledamage EVH with added air.  Probably happens that some variable isn't being transferred to the new unit , really hard to pin down.

 

I also don't get the action to heal and never seen the AI go into the water, they just plain refuse when I tested.

 

Seems we keep getting varying results.

I'll keep looking but time is limited right now.

Share this post


Link to post
Share on other sites

Yes it's MP. I have to have the units do a status check via group leader and then I get the wound damage icon. I then team switch into a dive team and load up each unit with yellow med packs and move the dive team next to the units that are damaged in the water and the dive team will heal the units by them self. I can even switch out of the dive team and they keep healing until they have no more yellow med packs on them. If they are in a back pack it will not work. I have try to adjust a whole bunch of things in a lot of the scripts with no luck but I'll keep on trying.

Share this post


Link to post
Share on other sites

Still need some help or direction on this. I know it can be done. I have seen it with AGM mod if a unit was wounded and unconscious his name would drop off the team switch menu but once he was healed and back on his feet the name would be added to the original spot on the team switch menu.

Share this post


Link to post
Share on other sites

BTC revive has a functional

btc_qr_unc_leave_group = true; //if true unc units will leave the group

 

This takes the wounded unit off the Team Switch menu and when he is healed adds the unit back but not in the original order only the squad leader will be put back into the original order.  How can I get the units back into the original order of the squad.

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

×