Jump to content
dlder

Add "Bis" heal action to object?

Recommended Posts

I've currently added a "player only" heal action to an object which works quite well:

Spoiler

addAction [
        "<t color='#ff0000'>Heal Player</t>",
        "_heal.sqf",
        nil,
        6,
        true,
        true,
        "",
        "damage _this > 0",
        5
    ];

 

_heal.sqf

_unit = _this select 1;

_unit playMove "ainvpknlmstpslaywrfldnon_healed2";

_health = getdammage _unit;

waitUntil {animationstate _unit ==  "ainvpknlmstpslaywrfldnon_healed2"};

while {damage _unit > 0} do
{
    _health = _health - 0.1;
    _unit setDamage _health;
    sleep 1;
};

_unit playMove "AidlPercMstpSlowWrflDnon_AI";

hint "You're fully patched up!";

 

 

But this does not work for AI...

 

Is it possible to add the heal function from the medical truck to an object, so that you get the same action for your ai team members ("Heal at ....").

 

Thanks!

Share this post


Link to post
Share on other sites

Seeing as it would be a pain in the patella to get AI to interact with an object, and I don't know any mission scripting that creates custom orders for AI, I would design around it and place a vehicle (ambulance, APC, helicopter?) that your AI teammates can get into. Then script a healing function or repeatable trigger around that.  

Curious what you end up with.

 

Share this post


Link to post
Share on other sites

You have some mods for revive / heal SP/MP AIs or players...

Module (so in a mod) is what i did because there are plenty of cases like:

- who can be healed,

- by who

- on what circumstances (distance, priorities, getting out vehicles, who...)

- with which difficulty: medic / mediKit / First Aid Kit

- what about medic injured/unconscious at his turn...

+ all little tricks like animations, unreachable positions, danger...

So not easy in a simple script! (see former approach).

Share this post


Link to post
Share on other sites

Ok, thank you guys for conferming what I feared 🙂

 

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

×