object.set_weapon_pickup_priority

If this function is called on a weapon, then it modifies how players pick up the weapon: you can require that players hold a button down to pick up the weapon (as is normal for most playable weapons), or make them pick the weapon up automatically when they come into contact with it.

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 called 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