Jump to content
Sign in to follow this  
NGagedFX

Deleting AI units

Recommended Posts

I made a script with which you can recruit AI units when near a flagpole. However, in case the AI gets stuck somewhere, I would like to be able to delete it. What I'm looking for is a command or script with which I can delete all AI units in my group/under my command and an option to delete a specific soldier, like the guy in slot 3 for example. I tried some stuff myself, but I'm not really experienced with scripting and complicated commands, so it didn't turn out anything. :(

Does anyone know a way to do this? :rolleyes:

Share this post


Link to post
Share on other sites

There's no need to script, it's already there. Just select the unit and in you QUICK COMMANDS menu select COMMUNICATION. Then just select the option DISBAND SELECTED UNIT (X), where X is the number for that unit.

---------- Post added at 06:28 AM ---------- Previous post was at 06:22 AM ----------

You seem to know some scripting and editing (at least more than me). Would you be able to help me with one of my problems? I want to know how to edit one of the vanila ARMA 2 multiplayer missions, such as WAR WELCOME or WHEN DIPLOMACY FAILS (when you creat your own server) to increase the maximum number of AI/player squadleaders allowed so I can have more people on the map. So I asked the question and someone answered it, but I didn't undrestand what he said, "yes of course you can, just look for kegetys amazing cpbo tool or eliteness, browse to your mp missions folder and extract the pbo and re-locate the folder to arma 2/ missions in my documents. edit in the editor and then when finished pack it back up and put it back in your mp missions folder. voila enjoy" (weedman). For example my MP missions folder in my ARMA 2 root directory is empty. Where do I find the mission to put it into my documents?

By the way I have ARMA 2 version 1.07 (not OA). Thanks.

Edited by kyfohatl

Share this post


Link to post
Share on other sites

@NGagedFX:

Without going into specific scripting on how to do it, I'd probably make them switchable so you can "unstuck" them manually. Getting "stuck" happens to me very frequently when they have sidearms (pistols), for reasons I don't know. If I needed this, I'd probably do it using a custom dialog, but it's not trivial to make.

Disbanding all shouldn't be a problem, just make a normal addAction that starts a script that goes through everyone in your group (using forEach) and makes them join another group via joinSilent and createGroup.

Disbanding a single/selected unit(s) is a bit more involved with addAction, since you can't access your actions with units selected. But you can make use of the shortcut feature and set it to one of your custom keys.

You might be able to put the command under the communications menu, but I don't know how, I've never used it myself.

@kyfohatl:

Builtin missions should be located under:

C:\Program Files\Bohemia Interactive\ArmA 2\Addons_A2\missions.pbo

Downloaded custom MP missions should be located under:

C:\Program Files\Bohemia Interactive\ArmA 2\MPMissions

When editing another mission (especially a builtin one), you should rename it; both the directory name and in the intel section in the editor. By changing directory name you avoid accidentally overwriting a custom mission when you export it. By changing name in intel, you avoid having same mission listed twice in the mission browser.

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  

×