Jump to content

Recommended Posts

I've spawned a backpack into a groundWeaponHolder and would like to be able to edit it's inventory but I haven't been able to figure this out yet. Either that, or after creating/editing a pack can I move it into the holder instead?

 

I haven't been able to come up with anything that'll work, and I've been through a number of options. The unit starts in an aircraft and jumps out doing the whole "add a parachute, save the original backpack for later" thing. But, rather than just throw a pack straight onto the unit's back when they land I want to have them move to the pack and pick it up off the ground. This happens by attaching the above groundWeaponHolder onto the unit, then having it dangle below them prior to landing (anyone who's ever seen/done a combat equipment jump will know what I mean). The pack hits the ground, then the unit lands nearby and moves over to get their pack. I just can't manage to add/remove anything from the pack I create in the weapon holder, nor can I move a pack from a temporary unit into the weapon holder.

 

The whole thing is still a WIP so it's a bit messy, but it's working mostly. Concerning the pack, to create it I'm currently using:

_pack = backpack _unit;
_packHolder = createVehicle ["groundWeaponHolder", [0,0,0], [], 0, "can_collide"];
_packHolder addBackpackCargoGlobal [_pack, 1];

I have been able to reference the pack using (for example) firstBackpack or everyBackpack but I can't get the result to mesh into something that I can use to edit the pack's inventory.

 

Any advice?

  • Like 1

Share this post


Link to post
Share on other sites

Any ideas from anyone?

 

I'd rather not take that part out and just spawn a pack on their back, but at this point I haven't figured worked anything out.

Share this post


Link to post
Share on other sites

Can't really help with Backpack issue although I'd imagine it would look like the other scripts that copy the contents and then spawn one on the ground or back on the unit when landed.

The only difference yours would be attached close to the player.

 

How will you attach the BP the rope won't function correctly when I tried it, it sort of just hangs in the air?

  • Like 1

Share this post


Link to post
Share on other sites

How will you attach the BP the rope won't function correctly when I tried it, it sort of just hangs in the air?

 

Lol, that was on my list of things to overcome too. I know what you mean, the pack stays where it's supposed to at the end of the rope but the rope just hangs in mid-air  :D

Also, unless I use a setPos loop to keep the pack at the end of where the rope SHOULD be it spins like a propeller around where the end of the rope would be, like this:

 

https://youtu.be/iOScGgBzvsg

 

I recorded that yesterday. Problems remaining are the rope, pack editing and pack spinning. The spinning is sorta fixed by that loop, it's not the best fix but it does alright. Might have to start making some compromises though.

 

 

copy the contents and then spawn one on the ground or back on the unit when landed.

 

I've tried spawning a temp unit with the same pack and items, then using the dropBag action to get it into the weaponHolder but it never worked. Maybe I had it wrong, and the description says it should work so I'll probably revisit that

Share this post


Link to post
Share on other sites

You could try looking for a small object that can be attached to a rope made invisible and attach BP to that..

Having said that I believe attachto has it's own issues in MP and finding suitable object may be a problem.

 

You can just have the rope hang and then use ropeend to find the location of the end of the rope and setpos BPP there, probably better to uses oneachframe to provide the loop.

  • Like 1

Share this post


Link to post
Share on other sites

You can just have the rope hang and then use ropeend to find the location of the end of the rope and setpos BPP there, probably better to uses oneachframe to provide the loop.

 

I've tried that, I can never get the rope to spawn using objNull for the "toObject" param.

 

I used a can of baked beans as the "toObject" though, instead of running a setPos loop. That seemed to work all the same, but probably better off doing that rather than running a loop. That rope though, holy cow the rope!!! I'm thinking I might just have to hide it. Not great, but no matter what I do it just stays there, as per the video.

Share this post


Link to post
Share on other sites

So, if the jumping unit is AI the rope will function correctly. If it is a player, that is when the problem occurs, even though I've attached the rope from the parachute, not the unit. Progress, of sorts. It does look pretty cool though for AI to lower their packs.

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

×