I have this vehicle repair script I found somewhere, however there was no readme included in the zip so I don't know who to give credit to. Anyway, this is the script...
F_Repair =
{
_vec = (vehicle player);
_type = typeOf vehicle player;
if(getDammage _vec > 0 or fuel _vec < 0.98 and not (_vec isKindOf "Man")) then
{
_inrepairzone = ((_vec in list RZoneA) or (_vec in list RZoneB) or (_vec in list RZoneC) or (_vec in list RZoneD));
if(_inrepairzone and _vec != player and speed _vec > -2 and speed _vec < 2 and position _vec select 2 < 2.0 and (local _vec)) then
{
titleText ["Servicing", "PLAIN DOWN",0.3];
for [{_loop2=0}, {_loop2<1}, {_loop2=_loop2}] do
{
sleep 0.200;
if (getDammage _vec > 0) then {_vec setDammage ((getDammage _vec)-0.0125);};
if (Fuel _vec < 1) then {_vec setFuel ((Fuel _vec)+0.0125);};
if (getDammage _vec == 0 and Fuel _vec == 1) then {_loop2=1;};
if(_vec != vehicle player or speed _vec < -2 or speed _vec > 2 or position _vec select 2 > 2.0) then {_loop2=1;titleText [localize "EVO_015", "PLAIN DOWN",0.3];};
};
_vec setVehicleAmmo 1;
};
};
};
for [{_loop=0}, {_loop<1}, {_loop=_loop}] do
{
[] call F_Repair;
sleep 1.011;
};
...and it works perfectly for how it was designed. The script is activated by any (damaged) vehicle that drives into a trigger zone, in my case a 10x5m trigger in front of a fuel station in a base. what I would like however, is to have an AI approach the vehicle where ever it parks in that area and do the medic animation (or if there is a more suitable anim I'm unaware of) in a loop until repairs are complete then returns to where he started the mission next to the garage. I would also like the script to take longer to repair vehicle than the current version. like a vehicle that starts repair at .8 damage may take 5 minutes or so to repair fully.