Merge pull request #2040 from jonpas/slideshowFixes

Slideshow Fixes
This commit is contained in:
Glowbal 2015-08-08 13:23:37 +02:00
commit 60b6540cbe
5 changed files with 27 additions and 8 deletions

View File

@ -6,7 +6,7 @@ class CfgVehicles {
displayName = CSTRING(DisplayName);
function = QFUNC(moduleInit);
scope = 2;
isGlobal = 0; // Server only
isGlobal = 1;
isTriggerActivated = 0;
isDisposable = 0;
icon = QUOTE(PATHTOF(UI\Icon_Module_Slideshow_ca.paa));

View File

@ -41,15 +41,24 @@ if (count _controllers == 0) then {
TRACE_4("Information",_objects,_controllers,_images,_names);
// Default images on whiteboards (first image)
{
_x setObjectTextureGlobal [0, _images select 0];
} count _objects;
if (isServer) then {
// Default images on whiteboards (first image)
{
_x setObjectTextureGlobal [0, _images select 0];
} count _objects;
// Number of slideshows (multiple modules support)
GVAR(slideshows) = GVAR(slideshows) + 1;
};
// Number of slideshows (multiple modules support)
GVAR(slideshows) = GVAR(slideshows) + 1;
_currentSlideshow = GVAR(slideshows); // Local variable in case GVAR gets changed during execution of below code
// If interaction menu module is not present, set default duration value
if !(["ace_interact_menu"] call EFUNC(common,isModLoaded)) then {
_duration = 5;
diag_log text format ["[ACE]: Slideshow: Interaction Menu module not present, defaulting duration value to %1", _duration];
};
// Add interactions if automatic transitions are disabled, else setup automatic transitions
if (_duration == 0) then {
{
@ -68,6 +77,8 @@ if (_duration == 0) then {
nil
} count _controllers;
} else {
if !(isServer) exitWith {};
// Formatted GVAR string (multiple modules support)
_varString = format [QGVAR(slideshow%1), _currentSlideshow];
TRACE_1("Current Slide",_varString);

View File

@ -14,7 +14,8 @@
*/
#include "script_component.hpp"
if !(isServer) exitWith {};
// Exit on Headless Client
if (!hasInterface && !isDedicated) exitWith {};
private ["_objects", "_controllers", "_images", "_names", "_duration"];

View File

@ -22,6 +22,7 @@ Keeping track of Arma 3 issues that need to be fixed. If you want to support us
* [James2464: 0023725: All Environment Rocks Should Have PhysX LODs](http://feedback.arma3.com/view.php?id=23725)
* [Jaynus: 0023679: Display event handler return values for mouse buttons should be respected](http://feedback.arma3.com/view.php?id=23679)
* [Heisenberg: 0023741: Switching between optic modes of a sniper scope (AMS, DMS, MOS) will result in a blurred vision](http://feedback.arma3.com/view.php?id=23741)
* [AgentRev: 0022310: setObjectTextureGlobal causing "Cannot load texture" errors when used with valid mission files](http://feedback.arma3.com/view.php?id=22310)
**Resolved:**

View File

@ -78,6 +78,12 @@ Slide duration | 0 (0 = disabled, number is in seconds)
- Only objects with hiddenSelection 0 can be used as "screens".
- If you set a duration the remotes will be disabled. (If the remotes are disabled `ace_interaction` is not needed)
- You can have multiple sets of images on different screens, see the advanced slideshow below.
- It is advisable images resolution sizes are powers of 2 (eg. 512x512) to avoid graphical glitches in them.
<div class="panel callout">
<h5>Note:</h5>
<p>Mission MUST be in a PBO format (not bare folder) when used on a dedicated server due to an [issue](http://feedback.arma3.com/view.php?id=22310) to prevent errors.</p>
</div>
### 3.2 Basic slideshow
*A set of 4 images that are swapped via a remote*