Advanced Throwing - Add object variable to disable pick up of attached throwables (#8031)

* Advanced Throwing - Add object variable to disable pick up

Use: `OBJECT setVariable ["ace_advanced_throwing_disablePickUp", true]`

* Documentation - Add Advanced Throwing Framework

* Update addons/advanced_throwing/functions/fnc_renderPickUpInteraction.sqf

* Update advanced-throwing-framework.md

Co-authored-by: PabstMirror <pabstmirror@gmail.com>
This commit is contained in:
jonpas 2021-02-27 18:04:43 +01:00 committed by GitHub
parent 13bce729ee
commit 5a36d1a771
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 21 additions and 1 deletions

View File

@ -31,7 +31,7 @@
_nearThrowables append (ACE_player nearObjects ["ACE_Chemlight_IR_Dummy", PICK_UP_DISTANCE]);
{
if (!(_x in _throwablesHelped) &&
if (!(_x in _throwablesHelped) && {!((attachedTo _x) getVariable [QGVAR(disablePickUp), false])} &&
{!(_x isKindOf "SmokeShellArty")} && {!(_x isKindOf "G_40mm_Smoke")} && // All smokes inherit from "GrenadeHand" >> "SmokeShell"
{GVAR(enablePickUpAttached) || {!GVAR(enablePickUpAttached) && {isNull (attachedTo _x)}}}
) then {

View File

@ -0,0 +1,20 @@
---
layout: wiki
title: Advanced Throwing Framework
description: Explains how to interact with the Advanced Throwing API.
group: framework
parent: wiki
mod: ace
version:
major: 3
minor: 7
patch: 0
---
## 1. Disabling pick up of ammo attached to an object
Pick-up interaction can be disabled for ammo (e.g. chemlights) attached to an object.
```js
OBJECT setVariable ["ace_advanced_throwing_disablePickUp", true, true];
```