OFPEC Forum

Editors Depot - Mission Editing and Scripting => Arma2 - Editing/Scripting General => Topic started by: swtx on 27 Feb 2010, 22:41:38

Title: Little AI help
Post by: swtx on 27 Feb 2010, 22:41:38
I'm trying to get the enemy AI to run across the street.  As simple as that sounds, I'm having a slight problem.  There is a curbed median in the center of the road that splits two lanes of traffic.  When the AI get to that median, they just stop.

My question is, how can I make the AI cross the median by stepping up in the curb? 

Is this possible ?

If someone has a solution or a script that would allow the AI to navigate over small obstacles, it would be greatly appriciated.


SWTX :banghead:
Title: Re: Little AI help
Post by: Loyalguard on 09 Mar 2010, 23:50:48
There are two solutions that immediately come to mind.  Is this always in the same spot or area?  If so, both solutions involve placing a trigger that covers the area in question.  Just be careful with the size of the trigger detection area and what type of units can activate it.  If it is along a median I would imagine you would want a long but very thin rectangle that runs parralel to median.  Also make sure that only AI can activate it.  Also remember that triggers only checks conditions about every .5 secs I think.  If you can work through that, then you could do one of the following:

1) Set the trigger condition so it activates when the AI is in the detection area that forces them to do the step over animation.  I do not know the name animation (you could try to find it via Clayman's Animation Viewer (http://forums.bistudio.com/showthread.php?t=76033)) however it is also possible that it won't work...it may depend on distance and motion.

or

2) When in the trigger you can "cheat" a little and setPos the AI just enough to get them past the median curb.  Maybe not fair if they are taking fire but you'll have to weigh those risks.  Good luck!
Title: Re: Little AI help
Post by: nominesine on 15 Mar 2010, 10:47:07
My solution would be to move the AI a wee bit to the right or left, and see if the problem persist. I don't know what Island you are using, but it sounds to me as if the island maker wanted to include an obstacle in the middle of the road.