2015-06-27 02:11:57 +00:00
|
|
|
/*
|
|
|
|
* Author: Jonpas
|
|
|
|
* Initializes the module.
|
|
|
|
*
|
|
|
|
* Arguments:
|
|
|
|
* 0: The module logic <LOGIC>
|
|
|
|
* 1: Units <ARRAY>
|
|
|
|
* 2: Activated <BOOL>
|
|
|
|
*
|
|
|
|
* Return Value:
|
|
|
|
* None
|
|
|
|
*
|
|
|
|
* Public: No
|
|
|
|
*/
|
|
|
|
#include "script_component.hpp"
|
|
|
|
|
2015-08-06 22:32:12 +00:00
|
|
|
// Exit on Headless Client
|
|
|
|
if (!hasInterface && !isDedicated) exitWith {};
|
2015-06-27 02:11:57 +00:00
|
|
|
|
2015-06-29 19:07:51 +00:00
|
|
|
private ["_objects", "_controllers", "_images", "_names", "_duration"];
|
2015-06-27 02:11:57 +00:00
|
|
|
|
2015-08-07 10:11:34 +00:00
|
|
|
params [["_logic", objNull, [objNull]], "_units", "_activated"];
|
|
|
|
|
|
|
|
if !(_activated) exitWith {};
|
2015-06-27 02:11:57 +00:00
|
|
|
if (isNull _logic) exitWith {};
|
|
|
|
|
|
|
|
// Extract variables from logic
|
|
|
|
_objects = [_logic getVariable ["Objects", ""], true, true] call FUNC(makeList);
|
|
|
|
_controllers = [_logic getVariable ["Controllers", ""], true, true] call FUNC(makeList);
|
|
|
|
_images = [_logic getVariable ["Images", ""], true, false] call FUNC(makeList);
|
|
|
|
_names = [_logic getVariable ["Names", ""], true, false] call FUNC(makeList);
|
2015-07-12 14:32:48 +00:00
|
|
|
_duration = _logic getVariable ["Duration", 0];
|
|
|
|
|
2015-06-27 02:11:57 +00:00
|
|
|
// Prepare with actions
|
2015-06-29 19:07:51 +00:00
|
|
|
[_objects, _controllers, _images, _names, _duration] call FUNC(createSlideshow);
|
2015-06-27 02:11:57 +00:00
|
|
|
|
2015-08-26 14:48:55 +00:00
|
|
|
ACE_LOGINFO(format [ARR_3("Slideshow Module Initialized for: %1 with Duration: %2", _objects, _duration)]);
|