Skip to content

Download Intel

Mike-MF edited this page Mar 13, 2024 · 12 revisions

This page will explain the usage of the download intel function.


/*
 * Author: Mike, Jonpas
 * Only Laptop, Rugged Laptop & PC Set - Screen are actively supported.
 * Has a laptop generate an intel download after an ACE interaction.
 * Will update in increments of 10% until 100. Refresh rate of the download is worked out as downloadTime / 10
 * Texture source is shown on the object via Attributes > Object Specific > Texture #X
 * Can use getVariable on the laptop to check if download is complete with QGVAR(downloadIntel_complete)
 *
 * Call from init.sqf
 *
 * Arguments:
 * 0: Laptop <OBJECT>
 * 1: Texture Source <NUMBER>
 * 2: Filesize <NUMBER>
 * 3: Download Time <NUMBER>
 *
 * Return Value:
 * None
 *
 * Example:
 * [Laptop, 0, 100, 60] call MFUNC(downloadIntel)
 */

Usage

This function will simulate stealing intel from laptops or screens by updating the texture over time. Currently it does this in increments of 10, and will display this by updating the progress bar by 10%.

The UI is linux and cannot be changed, only the filesize and download time can be altered.

The second parameter of the function is the texture source. To find this open the attributes of the screen you want to use >> Object Specific >> Texture #0, this is the number you use otherwise you will be texturing something else.
(Note: Do not use the # in the function call..)

NOTE: This entire function was designed for use with the "Rugged Laptops", it has been tested on the following:

  • PC Set (Screen)
  • Laptop
  • Rugged Laptop
  • Rugged large screen

It was tested on dual-screen objects, they aren't big enough and should not be used.

Available variables

There are variables available during the progress of the download.

  • _myObject getVariable ["tac_mission_downloadIntel_complete", false]; (Global: [BOOL])
  • _myObject getVariable ["tac_mission_downloadIntel_active", false]; (Global: [BOOL])
  • _myObject getVariable ["tac_mission_downloadIntel_stage", -1]; (Server only: [NUMBER])

Call from init.sqf

Example:

[My_Laptop, 0, 450, 300] call MFUNC(downloadIntel);

This example will set a 450GB download and will take 5 minutes total.

Alternative Example:

[My_Laptop, 1, 100, 600] call MFUNC(downloadIntel);

This example sets a 100GB download over 10 minutes total.

The parameters are:

  • 0: Object
  • 1: TextureSource (See above for information)
  • 2: Filesize (Number shown in GB)
  • 3: Download Time (Time to download in seconds)
Clone this wiki locally