Skip to content

Collect Intel

Mike-MF edited this page Dec 24, 2022 · 1 revision

This page will explain the usage of the Collect Intel function.


/*
 * Author: Kresky, Jonpas
 * Adds the ability to "pick up" objects, and add an intel entry in the briefing tab.
 * Call from initPlayerLocal.sqf
 * Check for validity of object when using delete on collection (isNil)!
 *
 * Arguments:
 * 0: Object name (The object you want to "pick up") <OBJECT>
 * 1: ACE Interact text <STRING>
 * 2: Hint message <STRING>
 * 3: Diary/briefing entry tab name <STRING>
 * 4: Description/text the intel contains <STRING>
 * 5: Delete on collect <BOOL> (default: true)
 *
 * Return Value:
 * None
 *
 * Example:
 * if (!isNil "intel01") then {
 * 	[intel01, "Collect Document", "Document picked up", "Intel", "Documents describing some stuff", true] call MFUNC(collectIntel);
 * };
 */

Usage

This adds an ACE interaction to pick up an object with creates a briefing entry with predefined text. It can also delete the object to simulate actually "Picking up" the object.

Call from initPlayerLocal.sqf

Example:

if (!isNil "MY_OBJECT") then {
    [MY_OBJECT, "Pickup Item", "Holy shit, my item was picked up", "Intel", "This is a briefing entry.", true] call MFUNC(collectIntel);
};

The parameters are:

  • 0: Object name (The object you want to "pick up")
  • 1: ACE Interact text (Text that appears on ACE Interact)
  • 2: Hint message (Text that appears as a hint)
  • 3: Diary/briefing entry tab name (Intel is default, leave it as is.)
  • 4: Description/text the intel contains (The entry that will show in the briefing)
  • 5: Delete on collect (Do you want the object to disappear on collection)

Note: Each "intel object" you have must be wrapped in if (!isNil "MY_OBJECT_NAME") then { Do not wrap them all inside the same one.

Clone this wiki locally