Jump to content
Jun Xiao

Can you help me realize this wish?

Recommended Posts

HI.

I had an idea , for the AI to disassemble the static weapon ,then carry a backpack.

I searched for a long time, but there was no answer.

How to let AI remove static weapons and carry backpack.

Scripts or code are fine

thanks.

  • Like 1

Share this post


Link to post
Share on other sites

Used the BI function BIS_fnc_packStaticWeapon.

This code will tell two units two disassemble and pick up a mortar but only works under specific conditions:

  1. You must have a Mortar Asst. unit in your group (Preferably the unit, "B_support_AMort_F," from what I've tested).
  2. You must also have a Mortar Gunner unit in your group (Preferably the unit, "B_support_Mort_F," from what I've tested).
  3. The two units must be in your group.
[
	(group player),
	(nearestObject [player, "staticWeapon"]),
	(leader group player)
] call BIS_fnc_packStaticWeapon;

If anyone on the forums wants to change the code and make it less restricted that would be kind of you.

  • Thanks 1

Share this post


Link to post
Share on other sites
5 hours ago, SpaceHippo said:

Used the BI function BIS_fnc_packStaticWeapon.

This code will tell two units two disassemble and pick up a mortar but only works under specific conditions:

You must have a Mortar Asst. unit in your group (Preferably the unit, "B_support_AMort_F," from what I've tested).

You must also have a Mortar Gunner unit in your group (Preferably the unit, "B_support_Mort_F," from what I've tested).

The two units must be in your group.

[ (group player), (nearestObject [player, "staticWeapon"]), (leader group player) ] call BIS_fnc_packStaticWeapon;

If anyone on the forums wants to change the code and make it less restricted that would be kind of you.

spacehippo

First thank you for your help.

This problem has been bothering me for a long time.

I don't know much about scripting. These can be used to assemble static weapons.

mortar_gunner addEventHandler ["WeaponAssembled",

{

_this select 0 action ["GetInGunner", _this select 1];

}];

_base = unitBackpack mortar_assistant_gunner;

mortar_assistant_gunner action ["PutBag"];

mortar_gunner action ["Assemble", _base];

If the player is not in the group.How does AI disarm static weapons?

Share this post


Link to post
Share on other sites
8 hours ago, Jun Xiao said:

HI.

I had an idea , for the AI to disassemble the static weapon ,then carry a backpack.

I searched for a long time, but there was no answer.

How to let AI remove static weapons and carry backpack.

Scripts or code are fine

thanks.

 

Have a look at this script.

https://forums.bohemia.net/forums/topic/206426-arma-3-script-handleautodeploy/

 

Cheers.

  • Thanks 1

Share this post


Link to post
Share on other sites
10 hours ago, cb65 said:

cb65  Thank you.

It's Great.

This script is very professional.

It would be nice to use this script to trigger other static weapons.I'll try to use RHS static weapons.

Unfortunately, it's too hard for me.

 

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

×