OFPEC Editors Depot

[Arma2] On-the-fly GFX Changer by Deadfast

Version 1.0
Added 10 Aug 2009
Downloads 825
Demo included Yes
Filesize 14.41KB
User rating Not yet rated

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"];


      - You can check the example missions (http://www.scriptingbay.com/public/deadfast/otfgfx_examples.zip) to check the aforementioned method, as well as an advanced one using display event handlers

 

View the forum thread for this resource here.


COMREF

The OFPEC Command Reference contains details of all scripting commands available to the editor.

Beginner's Tutorial

All you need to know about how to start editing.

Multiplayer Tutorial

This tutorial explains the mysteries of multiplayer editing.

OFPEC Tutorials

OFPEC hosts several quality tutorials written specifically for the site by staff and members...