Jump to content
Sign in to follow this  
50.cal

Load a M252 in cargo

Recommended Posts

Hi!

simple question:

Is it possible to load the M252 mortar in vehicle cargo?

I did some tests and although I hadn't the .ppa image file it was in the gear menu of my stryker but as soon as I try to take it, nothing happens...it just disappears. I guess I should load the tripod and M252 bags instead but I have no idea how to do it.

Also I'm trying to take some ammo for it but nothing shows up in the stryker gear menu.

First I've tried that:

clearWeaponCargo this; clearMagazineCargo this; this addWeaponCargo ["2B14",1]; this addMagazineCargo ["ARTY_8Rnd_82mmHE_2B14",2];

EDIT

I've found the bags class names and tried to add them like that :

clearWeaponCargo this; clearMagazineCargo this; this addWeaponCargo ["M252_US_Bag_EP1",1]; this addWeaponCargo ["Tripod_Bag",1];

But for some reasons it doesn't find the entry and can't load the mission.

EDIT 2

this addbackpack doesn't help either.

Any advices?

Edited by 50.cal

Share this post


Link to post
Share on other sites

52 views and not a single answer???

common!

Share this post


Link to post
Share on other sites

Mortars are vehicle weapons, vehicle weapons don't fit in cargo. You'd have to either break it down into pieces (two backpacks, but even that won't work I don't think) or virtualize it with addactions and publicVariables I guess? Or just attachTo it. :)

Share this post


Link to post
Share on other sites
52 views and not a single answer???

common!

52 views and no answer means that those 52 people might not have had the answer...

But AFAIK the backpack works like an ammobox, so you cant have an ammobox within an ammobox. Same goes for having an ammobox in a vehicles cargo.

Static weapons can not be added to a vehicles cargo, but it is possible to fake it via scripts (Addaction and the like).

EDIT: Kylania was faster :p

Share this post


Link to post
Share on other sites

Finally thx:)

I'm not looking for the perfect answer but just a little help.

You'd have to either break it down into pieces (two backpacks, but even that won't work I don't think)

But AFAIK the backpack works like an ammobox, so you cant have an ammobox within an ammobox. Same goes for having an ammobox in a vehicles cargo.

Static weapons can not be added to a vehicles cargo

So you're saying that I can manually add those "backpacks" in ammo boxes and vehicles but not via script???

or virtualize it with addactions and publicVariables I guess? Or just attachTo it. :)

..but it is possible to fake it via scripts (Addaction and the like).

EDIT: Kylania was faster :p

Lol I really don't know where to start with this :D

Edited by 50.cal

Share this post


Link to post
Share on other sites

Hi,

I hope I understand you correctly, if I do then yes it's possible if the AI are under your command. You can send an AI with a backpack weapon (i.e. Mortar or tripod) to a vehicle & have them bring up the gear screen, then click the left arrow to put that pack in the vehicle. You can also do it yourself.

I have only briefly tried to add backpacks to cargo via scripting & as you said it doesn't find the entry, in the end I attached them to the vehicle (attatchto command).

All the above was just tested with a MTVR truck & BAF on Takistan.

Regards

James

Share this post


Link to post
Share on other sites

hmm, guess you can put those disassembled backpack pieces into a truck and get them back out again. I swear that wasn't working before! :o

Share this post


Link to post
Share on other sites

You could always do it manually into vehicles, but not into ammo crates. Vehicles have a special attribute called "Backpackspace" or something like that. But I haven't figured out a way to add them to vehicles using script commands. We have addWeaponCargo (for vehicles) and addBackpack (for units), but no addBackpackCargo (for vehicles) command.

Share this post


Link to post
Share on other sites

I have only briefly tried to add backpacks to cargo via scripting & as you said it doesn't find the entry, in the end I attached them to the vehicle (attatchto command).

Yes for now it seems to be the only way. But I don't know how to use that command. Could you give me an example?

Vehicles have a special attribute called "Backpackspace" or something like that. But I haven't figured out a way to add them to vehicles using script commands. We have addWeaponCargo (for vehicles) and addBackpack (for units), but no addBackpackCargo (for vehicles) command.

Well for now the attach command might be more convenient anyway as I couldn't figure out how to load mortar mags in vehicles cargo or M252 backpack...if you know how to do that as well that's welcome :o

Edited by 50.cal

Share this post


Link to post
Share on other sites

@ 50.cal

Hi,

To use the attachto command put something like this:

bag1 attachto [Car1,[-0.9,-1,-0.4]] ; bag1 setdir 090

The above command will attach bag1 to car1 and the setdir command changes the direction of the object to align it on the side of my Jackal in this case, in the 1st array -0.9 is out to the side of the vehicle (Left side), (from a plan view think of the center of the vehicle as 0,0,0 though it's not always at the center), so on the right side would be a + number, -1 is the forward or Backward directions & -0.4 is Lower or higher on the vehicle. Just play around with the numbers till it looks correct, but remember to get the direction & Orientation correct before moving it into i'ts final by adjusting the attachto values.

You can also need to use the SetVecorDir Command http://community.bistudio.com/wiki/setVectorDir or the SetVectorDirAndUp command http://community.bistudio.com/wiki/setVectorDirAndUp to get the object orientation correct.

Note: If you have the BAF Addon the 1st line of code will put a mortar bag on the left rear side of a Jackal but 1st create a bag with:

bag1= createvehicle ["M252_US_BAG_EP1", position player, [], 0, ""]

Another command required is: detach bag1 which removes it's attachment with car1 in my case, this would be called when the player has taken the bag or added to an action when near the vehicle (Note: with backpacks if you select take bag (in game) it will be on your back & not visible on the vehicle till you put the bag down when it will be attached back on the vehicle)

Hope this Helps

James

Share this post


Link to post
Share on other sites

Sure it helps!!!

Thank you so much...it virtually create a new vehicle with a mortar on it now :)

I did it with the SOV.

Mortar1 attachto [sOV1,[-0.1,-1.6,-0.4]]; Mortar1 setdir 090;

I will now try this with those bags ;-)

Now if I want to redeploy the M252 I guess I will need the detach command too.

Should I put it in the same unit init?

Share this post


Link to post
Share on other sites

I thought that with the release of 1.56 that there was going to be a new scripting command that would give the ability to script a gun bag and tripod bag into the cargo of a vehicle. Does anybody know if this is possible yet? And if so, what is the command? I can't find a list of the new 1.56 commands anywhere.

Share this post


Link to post
Share on other sites

Yes, possible. Even new commands that does it globally without hazzle, i.e.:

_vehicle addBackpackCargoGlobal ["Tripod_Bag",2];

_vehicle addBackpackCargoGlobal ["M252_US_Bag_EP1",2];

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  

×