Leaflet - Theseus-Aegis/MissionTemplate GitHub Wiki

This page will explain the usage of the leaflet function.


/*
 * Author: Karel Moricky, Edited by Mike
 * Description: Initialize interactive leaflet. - Edited to be utilised locally, otherwise it does not work for static pickups (drone fired can use the default function)
 * Call from initPlayerLocal.sqf 
 *
 * Arguments:
 * 0: Position <ARRAY>
 * 1: Classname <STRING>
 * 2: Direction <NUMBER> (default: 0)
 * 
 * Example:
 * [[getPosATL LeafletPosition, "Custom_01"]] call FUNC(leaflet);
 * [[getPosATL LeafletPosition, "Custom_01", 10]] call FUNC(leaflet);
 * 
 * Returns Value:
 * None
*/

Usage

This adds an interactable leaflet which will show an image and any text provided to it. It requires a position array which can be done via using an object (See example)

Setup

This function requires minor config work & texture work.

Inside description.ext would require this:

 class CfgLeaflets {
    class Custom_01 {
        text = "This is my text that will appear.";
        texture = "MyImage.paa";
    };
};

The image itself must be a .paa file (can be converted using texView2 from Arma Tools) and must be 512x512. The class Custom_01 can be incremented upto Custom_10 and that is all the game supports.

Example:

[[(getPosATL MyLeafletPositionObject), "Custom_01"]] call FUNC(leaflet);
⚠️ **GitHub.com Fallback** ⚠️