Jump to content

Recommended Posts

Hello everyone. 

 

I'm new into mission editing and I'm having some frustration with the AI squad I'm commanding.

 

Basically I hate the fact that they have to wonder off and not keep in a tight formation, even after you command them into a formation such as 'file' or 'diamond'. Also, the fact that they easily get lost instead of maintaining a short distance between you and them while you're walking/running can be just as annoying. 

 

Is there any form of script, or technique, I could use/do in order to avoid this? I'm asking since my mission creation is based on 'CQB/CQC' style missions, which don't work that well due to these frustrating elements.

 

I also remember an option to change the player status from 'In formation' to 'none', which made them respect their exact position you placed them in the old 2D Editor. However, I can't seem to find this in Eden?

 

To sum it up, I would like my squad to behave much like the ones that did in old games such as R6's Raven Shield.  

 

PS: So far I've read through these posts, however none have presented a solution so far:

 

https://forums.bistudio.com/topic/193111-ai-closed-line-formation/?hl=formation

https://forums.bistudio.com/topic/192044-ai-ignoring-teammate-shooting-at-me/?hl=formation#entry3052244

https://forums.bistudio.com/topic/192555-hostage-pickup/?hl=formation#entry3066294 - not so relative but still kind of on topic. 

 

Thanks!

Share this post


Link to post
Share on other sites

That's all AI related. You are asking the AI to work the same as it worked in the OFP days.

 

AI on combat stances more intense than "SAFE" will prioritise more or less to keep in strict formation. IMHO it is an AMAZING thing.

 

Yoy may script your soldiers to keep in SAFE stance but will have some negative comsequences.

Share this post


Link to post
Share on other sites

I'm not sure what I'm doing wrong then, because my experience with AI relates to them moving all over the place, aside from their actual formation, especially in urban-based areas. 

 

An example: a squad of 4 members, player as team leader, ready to assault a house/building - Formation: File. Stance: Aware. ROE: Open fire, keep formation - I plan to storm the front door and expect the rest of my team to stand behind me. Instead, one is looking for another entrance, the other has wondered off to the garden and one is actually trying to get in my way!? 

 

I just don't understand why your squad mates can't respect the exact formation type you order them to. This is all probably to do with issues dealing with open-world based games, however I was hoping there are some sort of 'cheats' someone would know to get around it. 

Share this post


Link to post
Share on other sites

No, it's not easy.

 

In the stuation you describe, probably despite AI is trying to keep in formation, there are lots of obstacles to check, positions to watch etc.. and AI decides to break form a bit.

 

As I said, keeping in formation is a matter of prioritise regarding AI behaviour. In "COMBAT", the priority is very low, they break formations and tend to follow less the leader if he advances too much. In "SAFE" stance that won't happen, but in cities they will definetly count all the objects around and think the position where they should be is not the exact position of the formation. 

Share this post


Link to post
Share on other sites

You may be better off hitting ~ and ordering all them to move to a position inside the structure. Position 1, 2, 3 etc.

Its not going to fix your problem but more may actually enter the structure instead of going around. Probably not but its worth a try.

Share this post


Link to post
Share on other sites

I will give all your suggestions a go, doesn't hurt to try. Suppose for now it seems there is no viable solution, but thanks anyway, appreciate the help!

Share this post


Link to post
Share on other sites

What would be cool to see a mod called ARD which would solve your issue as it does in arma2CO is if Das Attorney ported or created a new version of his mod for Arma3:

http://www.armaholic.com/page.php?id=12815

see the vids, maybe ask him if he would be interested in doing it, I sure would love to see it in Arma3.

Share this post


Link to post
Share on other sites

That does look impressive. I'll send him a message, would be nice to have this feature in A3.

Share this post


Link to post
Share on other sites

In general, be sure to use combatMode "YELLOW" if you want your soldiers to stay in formation while fighting.

 

ArmA really isn't made for CQB though.

Perhaps we can improve things with a script that forces AI to move in a snake-like manner....

 

Maybe something like this (haven't tried it yet):

_spacing = 1^2;
_poslog = [];
doStop units group player;
while {(alive player) && (player isEqualTo (leader group player))} do {
	sleep 0.5;
	_p = getPosATL player;
	_poslog pushBack _p;
	_c = count _poslog;
	if (_c > 20) then {
		_poslog deleteAt 0;
		_c = 20;
	};

	_last = _p;
	_i = 1;
	_units = units group player;
	_cu = count _units;
	reverse _poslog;
	{
		if (_i < _cu) then {
			if ((_x distanceSqr _last) > _spacing) then {
				_u = _units select _i;
				if (alive _u) then {
					_u doMove _x;
					_last = _x;
				};
				_i = _i + 1;
			};
		};
	} count _poslog;
	reverse _poslog;
};

Share this post


Link to post
Share on other sites

Thanks.

 

Noob question here: can I just simply place that on the activation of the trigger, syncing it to the player's group, or would it be better to create an .sqf file?

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

×