object.set_weapon_pickup_priority

This function modifies how a weapon is picked up. A weapon can be configured so that players automatically pick it up when they come into contact with it. Additionally, weapons can be marked as high-priority: if the player holds the "weapon pickup" button while standing over a pile of weapons, you can make sure that the game preferentially has the player pick up a specific weapon in that pile.

This function does nothing when called on something that isn't a weapon. Sadly, you can't make grenades hold-to-pick-up or anything wacky like that.

Arguments

priority

One of the following values:

normal
The weapon's pickup behavior is not modified.
high

If this weapon is lying in a pile of weapons, and the player attempts to pick up a weapon from the pile, the game will preferto have them pick up this weapon. Good for objective items.

In versions of ReachVariantTool before 2.1.7, this value was incorrectly named hold_action.

automatic
Players automatically pick up the weapon when they come into contact with it.

Example

current_object.set_weapon_pickup_priority(automatic)

Notes

See also