Page MenuHomeFeedback Tracker

[Almost Fixed] Game freezes on dropWeapon to ground weaponholder
Assigned, NormalPublic

Description

Creating groundweaponholder and using action to drop primary weapon to it causes freeze

Details

Legacy ID
642194790
Severity
Crash
Resolution
Open
Reproducibility
Always
Category
Game Crash
Steps To Reproduce

create unit in the editor
preview
esc to open debug console
copy paste

_box = "GroundWeaponHolder" createVehicle position player ; player action ["dropWeapon", _box, currentWeapon player]

exec

game freezes as player reaches for the ground.

latest dev build

Additional Information

This issue was processed by our team and will be looked into. We thank you for your feedback.

Please keep the issue monitored to see when it is fixed.

Event Timeline

Killzone_Kid edited Additional Information. (Show Details)
Killzone_Kid set Category to Game Crash.
Killzone_Kid set Reproducibility to Always.
Killzone_Kid set Severity to Crash.
Killzone_Kid set Resolution to Open.
Killzone_Kid set Legacy ID to 642194790.May 7 2016, 2:07 PM

I can conform that crash is also happening when using WeaponHolderSimulated, however it does not happen straight away, you need to addweaponcargoglobal to the same weapon holder at the same time, this one is tricky to reproduce.

it also freezes the game if you putweapon or dropweapon designating another unit instead of weaponholder

I think this happens because there is no weaponholder object in A3 but groundweaponholder or weaponholdersimulated, and the action command tries to create weaponholder object to drop the weapon into. Just an idea.

This is still happening.

pystub added a comment.Sep 5 2013, 1:02 PM

dev beta 0.77.109799

http://pastebin.com/raw.php?i=WwRg5LgU
Called with '[player] call compile preprocessFile "WwRg5LgU.sqf"' when there is a dropped weapon that makes a pile (typeOf returns "GroundWeaponHolder").

STILL breaks when unit (player or AI) ends the reach animation.

Adanteh added a subscriber: Adanteh.May 7 2016, 2:07 PM

Still causes a crash.

PLEASE fix this! The drop actions are ridiculously fundamental!

Almost a year....seriously? FIX IT! The internal command has to work properly for players to be able to drop their weapons so fix the bloody action command!

this no longer causes crash but still does not work... the action is BUSTED Please fix it

"this no longer causes crash"

It still causes crash for me.

It only took a year :) Today's update fixed the crash but "DropWeapon" doesn't trigger "Put" event handler. Please please pleas BIS devs, whoever was working on this fix, finish it, make "Put" EH fire as well, this is essential. A half fix is not a fix :)

There needs to be a dropWeapon, dropUniform, dropVest and dropBackpack action and all of them should trigger the "Put" EH.

@PolarisUK agreed, drop uniform and vest needed. There is however DropBag action https://community.bistudio.com/wiki/Arma_3_Actions#DropBag

Again, "PUT" EH doesnt trigger for the DropBag either!!!

Guess what! DropMagazine DOES trigger "PUT" EH ??!! Yet when it is dropped as part of DropWeapon it doesnt!

I think since it is assigned to almighty japapatramtara, to make it easy lets just have a Arma 3 one universal action "Drop" (or "Put" ?)

player action ["Drop", weaponholder, inventory item, forceanimation];

inventory item - anything
weapon
magazine
item
uniform
vest
backpack
headgear
googles

force animation true or false. If true pick up animation played.
If false, transfer of the inventory item to weaponholder is immediate with no animation via unlimited distance.

+ "put" EH is triggered as it should.

also if for eaxample weapon type is passed only weapon alone is dropped without magazines. Magazines can be dropped additionally with another call to "Drop" action

Would also help if there is "PickUp" (or "Take") complementary action to pick anything from a weaponholder, analogous to the above action.

Yes, that would all be ideal! The weapon should only drop the single associated magazine and attachments.

I really wouldn't mind creating weapon holders manually, removing the items from the player and then adding them to the holder or visa versa...but we simply aren't able to do that. We aren't able to add magazines with specific ammo counts to containers, add items to vests/uniforms/backpacks while they're in a container, add weapon attachments/magazines to weapons in a container, etc. I don't particularly care which is implemented (ideally both) but one really...REALLY needs to be and quickly. Complete inventory manipulation is absolutely essential to any modification.

Also, I know I've said this a handful of times already on the tracker but vehicleContainer and addMagazine with specific bullet counts for containers - please!

@PolarisUK dedicated command is welcome but in the mean time, I've updated my function today, it is now a decent workaround http://killzonekid.com/arma-scripting-tutorials-addmagazineammocargoglobal/

I saw that a while ago actually Killzone, it's a pretty interesting workaround. But I've managed to find a different solution to that issue for what I'm doing at the moment. It'd simply be nice to remove the workaround.

SVN. 123629
action DropWeapon should throw "Put" action correctly now

What about dropbag mr wizard? :-)

DropBag has to wait till I will have a time for that(probably on friday)

Does the action actually work now though?

Even DropBag will execute "PUT" event since DEV. 123647

PolarisUK: sorry but, I don't understand you.. which action should work like what?

The crash seems to be solved but the last time I checked the actual action wasn't working. When you executed the action nothing would happen instead of the crash.

@japapatramtara "Even DropBag will execute "PUT" event since DEV. 123647"

Oooooooooooooooohemgee! Thank you!
I just dug up my old ticket where EH wasn't firing. I dare to ask but "AddBag" the opposite of "DropBag" doesnt fire "Take" EH http://feedback.arma3.com/view.php?id=17295 If you happen to have a spare minute could you look in it? Seems you are quite proficient with EHs Mr C+= :)

@PolarisUK the action works

Yes, it definitely does work now. Thank you! Is there any chance of Killzone's suggestion being implemented?

player action ["Drop", weaponholder, inventory item, forceanimation];

So we are able to drop uniforms, vests, backpacks, weapons, etc?

Dear japapatramtara,

Thank you for fixing EHs on "DropWeapon" and "DropBag". We know you are very busy so there is one tiny little thing left unfinished so that I can close this ticket. "DropBag" would be incomplete without the opposite part which is "AddBag". "AddBag" action works just fine, but it does not fire "Take" EH. So if you could please just do that, this would make "DropBag" and "AddBag" pair complete and usable.

How to test "AddBag" EH is working

player addEventHandler ["Take", {hint str _this}];
_wh = "GroundWeaponHolder" createVehicle position player;
_wh addBackpackCargoGlobal ["B_AssaultPack_mcamo_AT", 1];
player action ["AddBag", _wh, "B_AssaultPack_mcamo_AT"];

Thank you in advance!

the putweapon action also freezes the game

would be nice to see Killzone_Kid's suggestion :

player action ["Drop", weaponholder, inventory item, forceanimation];

inventory item - anything
weapon
magazine
item
uniform
vest
backpack
headgear
googles

I'm pretty sure most if not all developers would agree with Killzone's suggestion.

casper added a comment.May 9 2014, 4:29 PM

any progress stopping the "DropWeapon" or "PutWeapon" crashing/freezing the game?

Doesn't look like it or any of the other twenty absolutely vital features are being worked on. Take On Mars and Zeus are much more important!

I've just encountered the freeze while trying to "PutWeapon" something into a unit's backpack :(
Alternatively, my issue would be solved if we could add[..]WeaponItem to weapons in containers..