Jump to content
Sign in to follow this  
vostov

Trying to make more adaptive AI infantry patrols..

Recommended Posts

Is there a way to script a guard way-point like condition to a normal cycling patrol?

Here is another twist I think necessary to make the AIs seem more realistic in their attempts to find the target. Can the guard way-point be made to have a randomly selected distance of 100-200 yards off of the intended target? Then randomly generate sub way-points around the general area of the disturbance maybe 100-350 yards so the patrol acts like its conducting a search?

Honestly having a guard Mi-24 snooping around is cool but if the thing constantly flies straight over and straight at you its sort of obvious is knows exactly where you are just hasn't got the conditions to fire yet.

With infantry its worse they kinda just roam straight towards the position marked by another unit they weren't in contact with.

Another condition I wouldn't have any clue how to script would be a search termination - when the AI patrol hasn't engaged anything in combat within 5-10 min they disengage.

Once the guard unit disengages it moves back to its normal patrol pattern. This will mean I can make large missions where AIs react to disturbances within their sectors collectively. I don't have to waste groups of otherwise static units as the most reactive elements. These reactive groups would be less precise than normal allowing for say... a sniper mission to be alot more about sneaking around hitting and running or a larger mission more randomized with the emergence of combat.

Share this post


Link to post
Share on other sites

you kind of have to rewrite the ai to do it...with the tools arma provides of course

basically, you have to have a ton of triggers that say, if this, then this (i.e. if a unit is friendly, and enters within this much space of an enemy, and is within eyesight, infront of that unit...etc etc, then tell all enemy units on the map to engage the friendly...[radio is the fastest thing] -- and many other triggers which say other conditions you want met). remember, a computer only does exactly what you tell it to do...no more, no less. you basically have to sit down and write down every scenario you want to be covered, and write triggers for them...then test each one individually to make sure they work. so, im not gonna go ahead and write this for you, because it's gonna be a ton of work, and im not interested in using it myself...and im at work lol, but in any case, thats the gist of it as far as i know

as far as the waypoint thing goes, all you have to do is make it relative to the units position when you add them, save their location, then you can add the waypoints back if you need to.

im not aware of a way to end a script prematurely. the alternative is to create a boolean which is referenced by the script, and set it to true at the start, and set it to false when you are ready for the script to end. run checks against the boolean when needed, and when its false, end the script. as a side note though, its kind of a ridiculous concept to have a group of infantry that have just been engaged, to return to a normal patrol as if nothing happened. i would suggest a patrol with "COMBAT" behavior set around the area that the enemy was last engaged

Edited by GDICommand

Share this post


Link to post
Share on other sites

I'm just hoping for too much out of this engine. I really wish a few things would get fixed here. I suppose this game suffices for its real purpose which is to train soldiers and police forces.

I've managed to make AI behave like I want them to behave... but its very time consuming to do it with triggers manually using the default set of tools I've been given with the editor. I'm not a scripting master sadly I come here constantly as a resource for help.

I LOVE this game however buggy and shitty looking as things can be from 1000m away.

wtb z-fighting fix!

Share this post


Link to post
Share on other sites

The z-fighting was fixed in the latest proper patch 1.57 so you need to upgrade your version.

Share this post


Link to post
Share on other sites
I'm just hoping for too much out of this engine.

Nope, you're just bitching too much, while informed too badly.

I've managed to make AI behave like I want them to behave... but its very time consuming to do it with triggers manually using the default set of tools I've been given with the editor.

Make yourself comfortable with FSM and the FSM-Editor BIS provides. Doing what you want, patrols reacting to disturbances, is pretty much straight forward. You can make them search an area, move to check out anything suspicious, have a timeout, maybe randomized and then they go back to do something different.

And really, it's very comfortable to model such high-level behaviour in fsm. And best of all: it's totally fun.

If you need some examples, check out my RUBE library, in particular \RUBE\ai\ai_taskPatrol.fsm, though you need to load the whole RUBE thing to be able to run this fsm. But it should give you an idea by just looking at the fsm in the fsm-editor nonetheless.

^^ And if you wanna see that in action, then look out for my mission "RUBE Fire Ants". Haven't released it yet, but am close to.

Share this post


Link to post
Share on other sites

Is it possible to give the AI an FSM that does NOTHING!?

Because I hate them and dont need them. Im tired of fighting the AI because FSM's seem to be the top priority even over disableAI commands. Its the worst thing that ever happened to the AI, hope you are enjoying it ruebe.

I want to give the AI simple scripting commands like in all the other games when they worked and the AI would respect my orders. Im sure if there is a way to make the default FSM's deactivate completely so that scripted AI commands can be used again no one will ever say how so they can release the next AI mod that has an awesome "FORCE MOVE COMMAND" because thats the coolest thing an AI mod could ever do.

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  

×