Jump to content
Sign in to follow this  
Mighty_Joker

2 Questions: Artillery AI and AI in the mission editor

Recommended Posts

Questions 1:

As a total newbie to the editor (and to the game in general really) I've had great fun learning how to place artillery arrays for use when the player calls it.

Now, I'm wondering if there's any way to get the AI to use the artillery without my picking a target. I know that if you place some M119s within range of an enemy, they will fire at that enemy (sometimes anyway, I can't always get them to), but is there any way to get them to fire at positions located by other AI squads?

For example, AI squad 1 spots an enemy, and the AI artillery battery fires at that position. Is there any other way to bring artillery into a mission?

Question 2:

When setting up in the editor, I seem to be limited by waypoints. I have absolutely zero scripting knowledge, but am willing to learn a few good commands if it will achieve my purposes. Basically, how can I get placed squads to patrol, attack various checkpoints, spawn randomly; basically act in a higher-order way than just placing a Seek and Destroy or Guard waypoint?

I know there is lots of documentation about the editor, which I am reading through, but very little of it is newbie-friendly. All assume some level of understanding where to put what and terminology.

Thanks

Edited by Mighty_Joker

Share this post


Link to post
Share on other sites

1:

This is possible, but it requires a fair amount of scripting. There is no way to make this happen auto-magically. Luckily, there are already a few community-made AI script suites that achieve this very goal; one such example is UPSMON.

2:

Getting placed squads to patrol can be done very easily using the CYCLE waypoint type. Simply create a patrol path using MOVE waypoints, and then place a CYCLE waypoint at the end, next to the original MOVE waypoint where you want the patrol to start over. A CYCLE waypoint will automatically find the closest previous waypoint in the group's waypoint path and have the group switch back to that waypoint, progressing from that point forward.

AI will automatically attack whatever enemies they are aware of, so technically all you need to do is create a waypoint in the vicinity of that which you wish to be attacked. If you want the AI to blow up a particular unit or vehicle, you can use a DESTROY waypoint that is attached to said unit or vehicle (to attach waypoints to objects, simply double click on the object in the editor while in waypoint mode). Of course, 95% of the time this won't create the most compelling of attack maneuvers; the AI tends to move extremely slowly and get bogged down while in "Combat Mode," which it always defaults to when it knows about nearby enemies (as long as it isn't already in "Careless" or "Stealth" mode, neither of which is particularly conducive to attacking). There are various methods of scripting AI behavior to look more assault-like, but honestly, as native FSMs (such as "how to behave in combat") cannot be overwritten or disabled, none of them are all that effective. This is just a shortcoming of the ArmA 2 AI.

As for spawning AI randomly, this is again quite possible, but there is no auto-magical way to do it. However, there are a multitude of AI script suites out there that focus on doing just this in a somewhat easy-to-use way, the most prominent example being DAC (Dynamic AI Creator). Take note, however, that a large number of randomly spawning AI, particularly if using DAC, can cause considerable performance issues (and latency issues in MP).

As a side note, the GUARD waypoint is actually a pretty powerful waypoint type that can be used to create a basic sort of "higher-order behavior" in the AI. Whenever a group is given a GUARD waypoint, it will move to the first-placed "Guarded By..." trigger area that hasn't already been occupied by another group following a GUARD waypoint. However, once enemy are spotted anywhere by anyone on that group's side, all groups currently on a GUARD waypoint will leave their assigned trigger area and move toward the enemy contact (N.B., this can sometimes lead to impractical/ridiculous results, such as when you have an infantry squad with no transportation stationed on the opposite corner of a large terrain -- they will just walk all day until they get to the enemy, which will likely be gone by the time they get there). Once the enemy contact has been eliminated or lost, the groups assigned to GUARD waypoints will return to their previous trigger area post. A GUARD waypoint, therefore, like many other waypoint types in the game, can only be competed via a Switch-type trigger or scripting commands; if neither measure is taken, the group will maintain its GUARD behavior until it is killed or the mission ends.

Edited by ST_Dux

Share this post


Link to post
Share on other sites

Thanks for the reply ST_Dux. I'll look into the scripts you suggested, especially UPSMON. I never realised just how powerful the editor was, it's really quite fun considering the possibilities.

Share this post


Link to post
Share on other sites
1:

This is possible, but it requires a fair amount of scripting. There is no way to make this happen auto-magically.

Hard to judge what ST_Dux means by a fair amount of scripting. However, users of my ECHO package get some reasonably sophisticated automatic fire support for as little as 5 lines of sqf. Naturally you need more lines to get more features, but I've not seen any examples that took more than a page of code.

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  

×