Advertisement

Author Topic: RMM NVG - Adjustable Night Vision  (Read 1243 times)

0 Members and 1 Guest are viewing this topic.

Offline Rommel92

  • Members
  • *
RMM NVG - Adjustable Night Vision
« on: 02 Dec 2009, 06:11:23 »

(Example of increasing NV sensitivity)

Description:
I always disliked the use of add-ons that were easily done in missions, and especially for servers that run without add-ons, the ability to do some things that just really bug me.
That is why I created a mission side adjustable night vision script, please note it requires the BIS functions module. As always, an example mission is provided.

This script allows the player to adjust the sensitivity of his/her night vision using the page up and page down keys, or pressing the end key to enable auto adjust (BIS default).


Contents (mission folder):
init.sqf
mission.sqm
RMM_Modules.sqf
scripts\init_keyDown.sqf
scripts\init_NV_Adjust.sqf
RMM_Core

Usage:

To disable or enable the adjustable night vision, simply comment or uncomment the lines as follows:

To enable:
Code: [Select]
// Sets onKeydown display (46) event handler, array RMM_OKD is created with the format [<keys>, <code>], requires BIS functions module
if (RMM_Client) then {"scripts\init_keyDown.sqf" call RMM_f_ExecVM};

// Enables adjustable night vision, requires RMM_OKD, requires BIS functions module
if (RMM_Client) then {"scripts\init_NV_Adjust.sqf" call RMM_f_ExecVM};

To disable:
Code: [Select]
// Sets onKeydown display (46) event handler, array RMM_OKD is created with the format [<keys>, <code>], requires BIS functions module
//if (RMM_Client) then {"scripts\init_keyDown.sqf" call RMM_f_ExecVM};

// Enables adjustable night vision, requires RMM_OKD, requires BIS functions module
//if (RMM_Client) then {"scripts\init_NV_Adjust.sqf" call RMM_f_ExecVM};

To adjust the settings of the Adjustable night vision, open up the script "scripts\init_NV_Adjust.sqf" and modify the following settings only:
Code: [Select]
#define BRIGHTEN 201 //Page Up
#define DARKEN 209 //Page Down
#define AUTOADJUST 207 //End
#define MAX_APERTURE 25
#define MIN_APERTURE 0.7

List of Key Codes

Dependencies:
RMM_Core Functions
BIS Functions Module

Installation:
Simple installation; copy and paste the functions folder (and its contents) into your mission directory.
Ensure the BIS Functions module is placed in your mission.
Ensure RMM_Core is loaded correctly.

Compatibility Issues:
Some scripts may over-write the onKeyDown display event handler.

Author: Rommel
Date: 02/12/2009 (thats 12/02/2009 for the yanks)
Revision: 1

------------- DOWNLOAD -------------

Size: 4KB
Type: 7zip | .7z
Unpacker: www.7-zip.org

Mirrors:
http://www.4shared.com/file/163875435/1fa0696/RMM_NVGChernarus.html
« Last Edit: 25 Oct 2011, 02:17:11 by Rommel92 »