Jump to content
Sign in to follow this  
Windwalking

How to move a backpack into cargo with its contents

Recommended Posts

Hi all,

I am trying to work out a script to move the AI's backpack into the vehicle's inventory. I am doing it for a parachute eject script where they are supposed to pick up the parachute from the inventory and place their current backpack in the vehicle for later retrieval. I cant find a way to add backpacks to the vehicle without using classnames because I want the specific backpack of the unit with all its remaining ammo and items to be there and not just the default one. Any idea how to achieve that?

Share this post


Link to post
Share on other sites

You can use backpack player to get the class of backpack and backpackitems player to capture the contents and removeBackpack player to get rid of it then recreate it later. None of the addCargo commands work on objects though, so not sure how you'd remove a specific backpack and get it into cargo.

Share this post


Link to post
Share on other sites
You can use backpack player to get the class of backpack and backpackitems player to capture the contents and removeBackpack player to get rid of it then recreate it later. None of the addCargo commands work on objects though, so not sure how you'd remove a specific backpack and get it into cargo.

Thanks. I was afraid of that. I will have to get a workaround up then.

Share this post


Link to post
Share on other sites

Use a script that forces the player to drop his backpack before equiping him with a parachute, then move the dropped backpacks to a temporary location (setpos).

Later on you can then simply move the backpacks from the temporary location (somewhere outside your mission area) back to your players.

That is much easier than trying to save the exact contents.

Edit: Actually, instead of using a temporary location. You can also put a dummy-npcs for each player at that location and make them carry the backpacks for them. Should be fairly easy.

You will however need this:

https://community.bistudio.com/wiki/ArmA_3:_Actions#DropBag ;)

Need I elaborate further?

Edited by Tajin

Share this post


Link to post
Share on other sites
Use a script that forces the player to drop his backpack before equiping him with a parachute, then move the dropped backpacks to a temporary location (setpos).

Later on you can then simply move the backpacks from the temporary location (somewhere outside your mission area) back to your players.

That is much easier than trying to save the exact contents.

Edit: Actually, instead of using a temporary location. You can also put a dummy-npcs for each player at that location and make them carry the backpacks for them. Should be fairly easy.

You will however need this:

https://community.bistudio.com/wiki/ArmA_3:_Actions#DropBag ;)

Need I elaborate further?

This should work!! Thanks a lot for this awesome work around.

Share this post


Link to post
Share on other sites

Actually turns out using the dropbag action and having the vehicle as. Target will move the bag to the vehicle. Works quite nicely too.

Share this post


Link to post
Share on other sites

Hah, really?

Didn't expect that – good find. :)

I guess I'll put together a little script for grabbing and carrying around backpacks that also includes putting them into a vehicle. Sounds like a very useful thing to have.

Share this post


Link to post
Share on other sites

There was some 'drop bag action' fix in today's dev build. Was kinda unclear though, like this post from me. :)

Share this post


Link to post
Share on other sites
Hah, really?

Didn't expect that – good find. :)

I guess I'll put together a little script for grabbing and carrying around backpacks that also includes putting them into a vehicle. Sounds like a very useful thing to have.

It is yeah. Makes para-dropping on the fly feasible. I can't seem to find a way to delete a backpack from the vehicle though. Anyone knows a way?

Share this post


Link to post
Share on other sites
There was some 'drop bag action' fix in today's dev build. Was kinda unclear though, like this post from me. :)

I don't think it was related to that fix. I tried the script before updating and it was working. Maybe they meant the command drop backpack?

Share this post


Link to post
Share on other sites
I can't seem to find a way to delete a backpack from the vehicle though. Anyone knows a way?

Maybe the "takebag" command works for that, maybe it doesn't. Either way I guess there will be no way of telling which bag you're taking.

So if you want to know which bag is which, you'd still have to use dummys and make them carry the bags for you.

Share this post


Link to post
Share on other sites

I think I can just save the object reference with set variable then use take bag action using that value. However I am not able to try it now because the dev patch today seems to have messed up paratrooper AI. They now do not fold the parachute when they are on the ground and just hover around in a weird way. Sigh BIS is not making it easy.

Any idea how to counter that bug?

Share this post


Link to post
Share on other sites

Any idea how to counter that bug?

Don't design missions using dev branch unless a specific required feature is only available there.

The branch is designed to have game breaking bugs. Trying to work around them when they change daily is futile.

Share this post


Link to post
Share on other sites
Don't design missions using dev branch unless a specific required feature is only available there.

The branch is designed to have game breaking bugs. Trying to work around them when they change daily is futile.

Turns out the bug is in stable too. I had to delete vehicle for them to stop hovering.

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  

×