Add "GroundWeaponHolder_Scripted" class which allows for existence of empty holders
Closed, ResolvedPublic

Description

At the moment GroundWeaponHolder created with script will exist for a split second before it is deleted. This is a good feature to keep the game clean, but sometimes it could be undesirable as described in this thread:

http://forums.bistudio.com/showthread.php?184327-DropBag-not-doing-so

The solution could be the introduction of a subclass _Scripted that has autodeletion disabled:

class GroundWeaponHolder_Scripted: GroundWeaponHolder
{
forceSupply = false;
};

This will allow mission maker to make permanent placeholders for weapons and magazines if needed and not worry about autodeletion.

Details

Legacy ID
2888176530
Severity
Trivial
Resolution
Fixed
Reproducibility
Always
Category
Feature Request
Steps To Reproduce

N/A

Additional Information

It has been actually done on 28/11 in dev branch by this change, could You, please, give it a try?

Killzone_Kid edited Additional Information. (Show Details)
Killzone_Kid set Category to Feature Request.
Killzone_Kid set Reproducibility to Always.
Killzone_Kid set Severity to Trivial.
Killzone_Kid set Resolution to Fixed.
Killzone_Kid set Legacy ID to 2888176530.May 7 2016, 7:37 PM

I have added the property to class Weapon_Empty, it should be available tomorrow in the dev branch. Could You, please, give it a try, if it works according to Your needs?

Yeah, this is great, but this will only solve the autodelete bug with Weapon_Empty class. The problem I see is that Weapon_Empty inherits from WeaponHolder_Single_F, which would only show 1 item, where as GroundWeaponHolder_Scripted would behave as GroundWeaponHolder and show multiple items.

Also off topic, is there a way to make _Single weaponholders to be limited to single items?

Just to add WeaponHolder_Single_limited_magazine_F for example that is both single and limited has

transportMaxItems = 0;
transportMaxMagazines = 1;
transportMaxWeapons = 0;

params will still allow to place > 1 magazines in it both with script and UI

wh = "WeaponHolder_Single_limited_magazine_F" createvehicle position player; wh addMagazineCargoGlobal [currentmagazine player, 5]

SaMatra added a subscriber: SaMatra.May 7 2016, 7:37 PM

I agree with Killzone_Kid here, having GroundWeaponHolder_Scripted that behaves identically to GroundWeaponHolder (lets players put stuff in it through Inventory UI and displays what inside) but does not auto-deletes when empty will be definitely useful addition and I personally see use for such object in my missions (Wasteland specifically)

"It has been actually done on 28/11 in dev branch by this change, could You, please, give it a try?"

wh = "GroundWeaponHolder_Scripted" createvehicle position player;
hint str wh; //<obj-null>

The change from 28.11 dev branch actually adresses this issue as the scripted weapon holder inherits standard weapon holder with all the proxies, not juts the single one.

Oh I see, means Weapon_Empty now can show multiple items. Thanks. That note on CL was actually quite vague. Thanks again.

pettka added a comment.Dec 2 2014, 1:00 PM

My bad, I have even used a wrong field as I can see, I am sorry for the confusion :( And a good news, it should make it to the next main branch update soon (TM)

ruebe added a subscriber: ruebe.May 7 2016, 7:37 PM
ruebe added a comment.Apr 19 2015, 9:36 PM

Wait, so what can I use now to get a weaponholder that doesn't get deleted right away (see: http://feedback.arma3.com/view.php?id=23841)?

Currently, there is no "GroundWeaponHolder_Scripted" on devel. There are those "WeaponHolder_Single_" classes in addition to the simulated and the ground weaponholders, yet non of them work.

Do I miss something? :(

GroundWeaponHolder_Scripted and WeaponHolderSimulated_Scripted should be added to DEV branch soon.

Add Comment