Jump to content
Sign in to follow this  
mickeymen

How to make a run AI-units under enemy fire?

Recommended Posts

Hi to all

 

In fact, I endlessly face the same problem in Arma 3, when I try to make a some missions. Very often, there are times, when AI must move and save its ass, but does not move and endlessly dies! This problem annoys, because at such moments, I can say, that the current waypoint in the Arma3 do not function. If the AI currently uses a waypoint - "GET IN",  it means, that this AI must get into the given vehicle, but does not hunt for the enemy, since the commander will order him to attack the enemy targets. Thus, when AI under fire is a simple waypoint, can turns into a nightmare, because of which the whole squad can die.

 

In real combat, sometimes soldiers should only run and don't get stuck down in the combat. This can be a breakthrough towards to the priority target or running to the helicopter/vehicle to leave the dangerous region or salvation from a mortar attack etc. It is also sometimes necessary to show the fast retreat, some maneveurs or even cowardly soldiers with the specified waypoints, but each time in Arma 3, I can not do it. I tried various variations of settings inside the waypoints and tried to use AI-modules with disabled FSM, Target, Auto-targets options, but there is no obvious effect. AI will in prone or just stand still, almost without moving to its destination.

 

Users please help me. Everybody can imagine a lot of situations in which the mission maker will need such AI behavior, but imagine a simple situation: It is necessary to make the AI squad run at full speed to the evacuation vehicle, under enemy fire. How to do this? I'm not strong at writing scripting, I hope for clear advice.

 

Thank you for any help.

Share this post


Link to post
Share on other sites

Been scratching my head about this lately.

Somehow all those added AI commands do nothing in this regard, even something like this:

	_grp enableAttack false;
	{

		_x disableAI "AUTOCOMBAT";
		_x disableAI "TARGET";
		_x disableAI "AUTOTARGET";
		_x disableAI "SUPPRESSION";
		_x disableAI "COVER";
		_x setBehaviour "AWARE";
		_x setSpeedMode "FULL";
		_x doFollow leader _grp;


	} forEach units _grp;

doesn't work at all.

The group still stays in engagement, seeking cover and staying on the spot as if nothing happened.

 

As of right now there's no solution to this, unless I'm missing something.

 

Cheers

Share this post


Link to post
Share on other sites

If the AI have already seen the enemy then "Autotarget" and "Target"  only stop it detecting new targets those already known about remain.

I'm not sure about the rest of the DisableAI commands.

A new command was added forgettarget  so running that may help wipe the memory of known targets, I still think they will just stand still as it seems something else disables path finding when enemy are near. You could also throw in "FSM" and allowfleeing 0 but again I don't think it works.

 

The only way I got AI to move under fire which isn't realistic is to turn enemy into captives around my AI, I wasn't using WP's but used domove.

Share this post


Link to post
Share on other sites
5 minutes ago, f2k sel said:

If the AI have already seen the enemy then "Autotarget" and "Target"  only stop it detecting new targets those already known about remain.

I'm not sure about the rest of the DisableAI commands.

A new command was added forgettarget  so running that may help wipe the memory of known targets, I still think they will just stand still as it seems something else disables path finding when enemy are near. You could also throw in "FSM" and allowfleeing 0 but again I don't think it works.

 

The only way I got AI to move under fire which isn't realistic is to turn enemy into captives around my AI, I wasn't using WP's but used domove.

 

You basically need to run forgettarget on every frame since when being engaged they immediately know about their enemies again.

 

Maybe after BI introduce 3 more obscure disableAI commands when half the playerbase sacrificed their pets to cthulhu we'll be at least halfway of having control over AI.

 

Other than that it's probably easier setting them to careless behavior but then they won't run/sprint.

 

Cheers

  • Like 1

Share this post


Link to post
Share on other sites

Hi Folks,

 

I had though Mad Cheese (C2 Mod) has the ability for AI to ignore the enemy AI and run away when needed ??? I know he now has a button on his mod to do just that... Woofer did some experiments with (FHQ Mod) as well - might be of interest...

 

 

Regards,

Scott

  • Like 1

Share this post


Link to post
Share on other sites
6 hours ago, Grumpy Old Man said:

Been scratching my head about this lately.

The group still stays in engagement, seeking cover and staying on the spot as if nothing happened.

As of right now there's no solution to this, unless I'm missing something.

 

Hi mate,

 

I think the "cover" fsm command is broken - even with no enemies, they shout at each other and seem to pause indefinitely when they complete a waypoint.

 

The "checkvisible" fsm command works ok though, so it might be worth trying to make them forget then making them "blind":

 

    _grp enableAttack false;
    {
        {
            _x forgetTarget (_x select 4)
        } forEach (_x nearTargets 1000);
        _x disableAI "checkvisible";
        _x disableAI "AUTOCOMBAT";
        _x disableAI "TARGET";
        _x disableAI "SUPPRESSION";
        _x setBehaviour "AWARE";
        _x setSpeedMode "FULL";
    } forEach units _grp;

 

  • Like 1

Share this post


Link to post
Share on other sites

 

 Maybe a year ago one of the Devs mentioned they "might" start working on a new and improved Flee behaviour for AI  That would help in all of this. They give us some pieces to the puzzle but it'd be nice to just have to full functionality outta the box -  "run Bitches Run!!" - command.

  • Like 1

Share this post


Link to post
Share on other sites

Hmm, seems I boobed:

 

This sort of works (units disengage but then don't move (only tested it once)

 

    _grp = group cameraOn;
    _grp enableAttack false;
    {
        _un = _x;
        {
            _un forgetTarget (_x select 4)
        } forEach (_x nearTargets 1000);
        _x disableAI "checkvisible";
        _x disableAI "AUTOCOMBAT";
        _x disableAI "TARGET";
        _x disableAI "SUPPRESSION";
        _x setBehaviour "AWARE";
        _x setSpeedMode "FULL";
    } forEach units _grp;

 

Share this post


Link to post
Share on other sites

I added this after the disableAI codes from Das to keep them dumb
 

while {true} do {
  {
       _un = _x;
        { 

          _un setBehaviour "careless" ;

          _un forgetTarget (_x select 4) ;
        } forEach (_x nearTargets 1000);

      } forEach units _grp;

sleep 0.1;

};

 

 

what happens is they don't return fire go prone or run away but they still walk slowly.

However if you then add this to  the waypoint actions  when you want them to run they will

{_x domove waypointPosition  [group this ,1+currentwaypoint group this ]} foreach units group this;

 

It seems when using careless wp they will only walk but if you also give them a domove to the next waypoint  they will run.

 

 

 

 

 

 

  • Like 1

Share this post


Link to post
Share on other sites

We use VCOM AI on our ALiVE server and it works and does exactly what you are intending in your question. It is really easy to setup and run as a server side script package and has a low impact on server FPS. 

 

 

Share this post


Link to post
Share on other sites
3 hours ago, froggyluv said:

 

 Maybe a year ago one of the Devs mentioned they "might" start working on a new and improved Flee behaviour for AI  That would help in all of this. They give us some pieces to the puzzle but it'd be nice to just have to full functionality outta the box -  "run Bitches Run!!" - command.

 

Before, I proposed to create a new waypoint and new command  - "breakthrough" .  https://feedback.bistudio.com/T81042

But my ticket was safely shut down. I hardly believe that developers will improve AI. Unfortunately, they are more interested in the visual series in the form of new DLC.

 

 

5 hours ago, scottb613 said:

Hi Folks,

 

I had though Mad Cheese (C2 Mod) has the ability for AI to ignore the enemy AI and run away when needed ??? I know he now has a button on his mod to do just that... Woofer did some experiments with (FHQ Mod) as well - might be of interest...

 

 

Regards,

Scott

 

Thanks. This video seems interesting, but I can not understand everything in the speech of this dude, because English is not my native language.  What exact mod (one mod) can give this AI-ability ? 

 

 

1 hour ago, Nichols said:

We use VCOM AI on our ALiVE server and it works and does exactly what you are intending in your question. It is really easy to setup and run as a server side script package and has a low impact on server FPS. 

 

 

 

Thanks. Unfortunately before, I tried using VcomAI, but I did not like this mod. I prefer ASR AI, it's really impressive, because enemy AI in this mod more dangerous.

 

It seems to me, that the problem of running AI, under enemy fire is a more difficult problem than I foresaw. Even if there is a solution, the mission-maker, will first have to blow up his brain (

 

 

 

Share this post


Link to post
Share on other sites

 

 Jesus not even a comment. Thats why I dont use feedback tracker - I'd get enraged with that level of being ignored

Share this post


Link to post
Share on other sites
6 minutes ago, mickeymen said:

Thanks. Unfortunately before, I tried using VcomAI, but I did not like this mod. I prefer ASR AI, it's really impressive, because enemy AI in this mod more dangerous.

 

ASR AI is OK but in my testing does not give you the player any "real" obstacles to overcome when you are fighting the AI. Especially in an ALiVE mission environment. With VCOM AI the AI actually does suppression to disengage when they start taking too much damage and the remaining team mates toss smoke and use cover to either recover and move wounded AI team members to safe positions, call in reinforcements or attempt a flanking manuever to get away. That is some thing I have never witnessed with ASR AI or any other mod for AI control.

Share this post


Link to post
Share on other sites

At this point I'd be glad if they stop all these half - assed attempts to fix AI behavior,

if they write the AI from ground up for the next arma iteration, with customization and scriptability in mind and a more self preserving behavior.

 

Placing a blufor rifleman in front of 3 opfor squads that are facing away from him, will always make that one single blufor soldier open fire.

 

Stuff like that shouldn't happen.

 

Cheers

  • Like 3

Share this post


Link to post
Share on other sites

I used to play a lot of SP in Arma 2 but the AI were always a headache and I spent a lot of time learning scripting to try and get them to do what I wanted.  I gave up in the end as it's like pissing in the wind.

 

I'd say that now (in A3), if you're playing against AI, then they're okay, but still do really stupid stuff and get stuck in buildings or inexplicably freeze etc.  Personally, I'd say it's still not worth trying to command a squad unless you enjoy pulling your own teeth out.

 

I have a lot of respect for AI modders but it really is like trying to fight the engine and everything that can be done is in spite of the engine.  At some point, you have to cut your losses and accept it for what it is.

 

Agreed GOM - they need to start from the beginning and build AI in a more modular way.

  • Like 1

Share this post


Link to post
Share on other sites
3 hours ago, froggyluv said:

 

 Jesus not even a comment. Thats why I dont use feedback tracker - I'd get enraged with that level of being ignored

Already I was 100 times angry and 100 times calmed down. Unfortunately, feedback is a complete shit. Previously, it worked a little, but now it does not work at all. But I continue to make reports! And do you know why? So I collect the errors of Arm3 ;)

 

3 hours ago, Nichols said:

 

ASR AI is OK but in my testing does not give you the player any "real" obstacles to overcome when you are fighting the AI. Especially in an ALiVE mission environment. With VCOM AI the AI actually does suppression to disengage when they start taking too much damage and the remaining team mates toss smoke and use cover to either recover and move wounded AI team members to safe positions, call in reinforcements or attempt a flanking manuever to get away. That is some thing I have never witnessed with ASR AI or any other mod for AI control.

 

It sound not bad) But my experience was different.

I experimented with two versions. With 2.6. and 2.81. 
In the both versions, I at least witnessed 10 times as enemy AI сouldn't kill me from a distance of 5-7 meters at a time when I didn't see it! He just shoots 20-25 shots and all the shots pass me by! But, sometimes the enemy AI does not fire at the player in general!  He just looks at the player and waits until the player shoots it. It looked very stupid.

In the description of the mod it was written that the AI uses mines and explosives!!  Then I was in lust! But how this AI uses explosives? Once, the Vcom AI goes into danger-mode, he just puts the explosives on the current position and this is all his logic!
Unfortunately it ability looks like a primitive scripting. So, the AI simply spawnes the mines/bombs in the most illogical places, for example in the middle of the roads or other open places. I always dreamed to AI in A3 used explosives, but in this case, as seems to me, will be better if AI will not use explosives at all, than the player will see this.

 

I would not want to offend the author of Vcom mod, but let him excuse me, since each user has the right to his or her personal opinion. I remember, after that, with  skepticism, I launched ASR AI Mod and was pleasantly surprised, since my character had to die many times, in totally unpredictable ways.

In this mod, AI is very dangerous, thanks to the use of grenades. ASR is not perfect, but today I stopped here.

 

3 hours ago, Grumpy Old Man said:

At this point I'd be glad if they stop all these half - assed attempts to fix AI behavior,

 

I think they do not even have attempts for a long time.

 

 

 

  • Like 1

Share this post


Link to post
Share on other sites

There's a really easy way to do this, but it depends on what you need it for.

Basically, set up machinegunners in enemy clothing and make them independent. Have them "doTarget" and "doFire" specific units, or invisible units with disabled damage around a target area, that's what I do. Make them terrible at aiming and/or traverse between targets, the bullets will land everywhere. I use this for an Omaha beach assault mission. It looks freakin amazing, an entire company assaulting a beach under fire.  The AI friendlies will not perceive it as enemy fire, and will do whatever you want, while the bullets are still as dangerous as an enemy's, so guys will be picked off. You can do the same with with artillery. No huge scripts or files needed. 

You can script friendly units to fire back, and trigger enemy's to appear/Show/Hide when you get closer to a bunker. 

But obviously this is for a more cinematic scene, so again, it depends on how you want to use your AI. I think this method looks more fluid and can be controlled more specifically at the same time, while opening files and disabling AI's all over the place is going to be detrimental to the mission on the whole. My method allows them to run under fire in a specific area, and then return to a combat/shoot and move behavior on its own without touching a thing. 

Share this post


Link to post
Share on other sites

I wonder if using setUnitPos "UP" to stop them from going prone all the time could help to some extend.

Share this post


Link to post
Share on other sites

I'm using:

    myGroup setCombatMode "BLUE";
    myGroup setSpeedMode "FULL";
    {_x setUnitPos "UP"; _x disableAi "autoCombat";  _x disableAi "autoTarget"} foreach units myGroup;
    myGroup allowfleeing 0;
    myGroup setBehaviour "AWARE";

 

Not so bad.

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  

×