On-the-fly GFX ChangerVersion 1.00
@2009 Deadfast
Allows you to let the players change their view distance and terrain detail in your multiplayer mission using a simple dialog.
How to use?
------------
1) Extract the "otfgfx" directory into your mission root directory.
2) Add the following somewhere (on its own line) to your mission's description.ext:
#include "otfgfx\otfgfx_dlg.hpp"
3) ExecVM "otfgfx\otfgfx_scripts.sqf", the parameters are following:
[
default view distance (0 - ?),
min view distance (0 - ?),
max view distance (0 - ?),
default terrain detail (1 - 5),
min terrain detail (1 - 5),
max terrain detail (1 - 5)
] (all real numbers)
All parameters are optional, if not specified otherwise default parameters will be used.
IMPORTANT! You must send at least an empty array ( [] ):
_null = execVM "otfgfx\otfgfx_dlg.hpp" - will not work!!!
Default values are:
Default VD: 1,200m
Min VD: 500m
Max VD: 10,000m
Default TD: 2
Min TD: 1
Max TD: 5
Examples:
[1500, 1000, 3000, 3, 2, 5] execVM ""otfgfx\otfgfx_scripts.sqf"";
[1500, 1000, 3000] execVM ""otfgfx\otfgfx_scripts.sqf"";
[] execVM ""otfgfx\otfgfx_scripts.sqf"";
4) Use the following to code to open the settings dialog for the player:
[] call DFS_otfgfx_openSettings;
TIP: Use an action (addAction) to open the dialog:
a) Create a new script called "gfx_settings.sqf" in your missions' root directory
b) Put this code into the file:
[] call DFS_otfgfx_openSettings;
c) Add the action to open the settings dialog to an object of your choice:
myObject addAction ["Change graphics", "gfx_settings.sqf"];
2 example missions (one using addAction and using key assignment method) can be found in the 'examples' directory.
OFPEC Download