Jump to content

Recommended Posts

Hello armaholics!

 

I've run into some trouble with AI and a certain building.

 

I've put AI Waypoint to go into to a military cargo building. The problem is not if they can go inside.

The group leader goes where he's suppose to, but some other group members start crawling under the building, then standing up. This results the AI half under and half inside the building.

 

Link to image of the building

 

Is there a way to disable AI from crawling? Forcing them to not go under the building.

 

I'm aware of putting AI to only stand or only crouch, but I want them to be able to crouch and stand. Just removing the crawling aspect.

 

 

Thanks in advance!

 

 

Some of my missions:

[CO-04] Last Stand - Compound

[CO-04] Last Stand - Town

[CO-04] Terrorist Hunt - Village

[CO-04] Terrorist Hunt - Factory

Share this post


Link to post
Share on other sites
12 hours ago, HazJ said:

https://community.bistudio.com/wiki/setUnitPos

Maybe this? If injured too much, they will crawl. You can use HandleDamage/Dammaged/Hit EH and check condition using canStand. Then heal them or whatever...

https://community.bistudio.com/wiki/canStand

 

Thanks for your interest.

I used setUnitPos, but still the AI started to crawl under the building. Strange as it's suppose to force AI to only stay standing. It works in normal firefights.

 

Link to more in detail example pictures:

https://imgur.com/a/ZdZqHv2

Share this post


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

You can set again inside one of the Anim EHs. Just checking the returned animation is prone.

https://community.bistudio.com/wiki/Arma_3:_Event_Handlers

When you say crawl under a building? How do you mean? Is the building off the ground or something? Screenshot?

 

Yup, the building is standing and you can crawl under it.

 

Here's some screenshots:

https://imgur.com/a/ZdZqHv2

Share this post


Link to post
Share on other sites

Hmm. I recall something with disableAI which allowed AI to still move but it would disable all the crap that made them go around things and stuff like that. Can't find it atm... Also... Do you order them via group command? Does this happen when ordering multiple units at once? Is there anything blocking causing collision, etc...

 

EDIT: Found it I think. Not sure if it worked. Worth a try:

https://forums.bohemia.net/forums/topic/211771-ai-pathfinding-in-custom-compound/

Feel free to upload a basic demo mission. I'll have a mess with it when I get chance.

Share this post


Link to post
Share on other sites
2 minutes ago, HazJ said:

Hmm. I recall something with disableAI which allowed AI to still move but it would disable all the crap that made them go around things and stuff like that. Can't find it atm... Also... Do you order them via group command? Does this happen when ordering multiple units at once? Is there anything blocking causing collision, etc...

 

I've put waypoint via group. The leader and another unit may walk inside as they should, the rest may stay outside the building, and that's fine as well.

But then some of them start crawling under the building, then standing up. Total immersion killer.

 

I want them to behave normally, without being able to go prone. Because the AI is suppose to attack, while players defending the building.

It's okay that they go around the building, but I'm not okay with them starting to crawl under the building.

 

There doesn't seem to be any collision when they stand up under the building. But that's only when they've already crawled under it. Otherwise they do avoid just going through the walls, which is good.

Share this post


Link to post
Share on other sites

This should do.

this addEventHandler ["AnimStateChanged",
{
	params ["_unit", "_anim"];
	_unit setUnitPos "UP";
}];

Originally I had condition check to see if the stance had changed, etc and only run code if true but doesn't really matter. However, you may want to add an if statement in there for when they encounter enemy so they may go prone if that's what you want.

https://community.bistudio.com/wiki/combatMode

If you order the AI to go prone via command (group) then this won't work.

https://community.bistudio.com/wiki/combatMode

Share this post


Link to post
Share on other sites
43 minutes ago, HazJ said:

This should do.


this addEventHandler ["AnimStateChanged",
{
	params ["_unit", "_anim"];
	_unit setUnitPos "UP";
}];

Originally I had condition check to see if the stance had changed, etc and only run code if true but doesn't really matter. However, you may want to add an if statement in there for when they encounter enemy so they may go prone if that's what you want.

https://community.bistudio.com/wiki/combatMode

If you order the AI to go prone via command (group) then this won't work.

https://community.bistudio.com/wiki/combatMode

 

This didn't seem to work.

 

Am I right, if I put this in enemy unit init?

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

×