Jump to content
Sign in to follow this  
bolbies

Automatic Medic Support Help

Recommended Posts

I play Dynamic Universal War System a lot so I need the AI's help regularly. Unfortunately, everyone knows the AI in this game is not the easiest thing to control and requires a lot of micromanagement. Getting medical attention either for myself or just other units is a massive pain. I've been looking around for an automatic AI medic script and have tried this and this but can't get either to work. Does anyone either have a general idea of how to write out a script like this or even know of one that does work?

I have put this line in the medic's init field:

_dummy = [_medic, units (group player)] execVM "autoheal\autoheal.sqf";

and in the autoheal.sqf I have this at the beginning:

_medic = _this select 0;
_selectedUnits = _this select 1;
_injured = objNull;

while {(alive _medic)} do {

For some reason I am getting an error saying "Error alive: Type Array, expected Object." Anybody have any ideas on how I can fix this?

Share this post


Link to post
Share on other sites
Have you checked out A3 wounding system? Its a pretty neat freaking script but calls medic when unit goes down, not necessarily hurt..

http://forums.bistudio.com/showthread.php?170975-A3-Wounding-System

I have been looking through it but I can't seem to find how it recognizes medics and uses them. I'll continue looking but this seems way more advanced than just assigning him the role when you spawn him.

Oh I guess I forgot to put links in the original post for "this and this." bardosy's script was one that I've tried but for whatever reason it refuses to work for me. The other is the WW AI Menu.

---------- Post added at 14:19 ---------- Previous post was at 13:54 ----------

Alright so I decided to go back and see what the specific error was for bardosy's script and it's literally the same thing. For whatever reason the medic's init field cannot define a variable. Obviously this is now a DUWS problem so I'll mess around more with that. Any more ideas would be greatly appreciated!

Share this post


Link to post
Share on other sites

I think I've got almost everything working but there's an error here -

if((_x isKindOf "B_Medic_F" || _x isKindOf "O_Medic_F" )&& ("Medikit" in (items _x))) then
       {
       	_medicsHealing = true;
        [_x, _selectedUnits] spawn automedic;
       };
} foreach (_selectedUnits);

saying "Error foreach: Type Object, expected Array." Does anyone know what's wrong?

Edited by bolbies

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
Sign in to follow this  

×