Introduction

Visible Laser - Show the point where I a“i”m!

This Mod adds a simple visible laser on your laser sight.
Supports vanilla and Mod laser pointer that configured properly.

How to use

Turn on the laser

You can turn on the visible laser by pressing the same key with the vanilla IR Laser.
The NVG on your head must be off beforehand, otherwise it turns the IR Laser on.
Works only if you have an IR Laser Pointer (vanilla/modded).
L by default.

Switch the laser color

You can switch the color by pressing predefined key.
Available colors are: Red, Green, Blue.
Works only if you turned the visible laser on already.
You have to assign this key from Options > Controls > Visible Laser > Switch Visible Laser Color. I assign it to Left Ctrl+L.

Technical Document

This Mod adds 3 functions to make it happened.

PLP_fnc_VL_laserMissionInit

The function that controls the entire laser functionality. Loaded in the begining of the mission by default. You don't need to call this function manually.

PLP_fnc_VL_laserUnitInit

The function that spawns laser for the unit. Unit could either be an AI or a player.
Available arguments are: Example:
[player, 1] call PLP_fnc_VL_laserUnitInit; //Turns on the laser on the player unit, if the player equips a weapon with an IR Laser Pointer. [player, -1] call PLP_fnc_VL_laserUnitInit; //Switches the laser on the player unit. [player] call PLP_fnc_VL_laserUnitInit; //Same as above. [unitAlpha, 1, true] call PLP_fnc_VL_laserUnitInit; //Turns on the unit unitAlpha's laser locally

PLP_fnc_VL_switchLaserColor

Switches the visible laser color. Won't work if the unit's laser is off.
Available arguments are: Example:
[player] call PLP_fnc_VL_switchLaserColor; //Switches player's laser color. [player, 2] call PLP_fnc_VL_switchLaserColor; //Switches player's laser color to blue. [unitAlpha, 1, true] call PLP_fnc_VL_laserUnitInit; //Switches the unit unitAlpha's laser to green locally.

Note

This Mod is not performance-friendly, especially there're more than about 10 lasers in the mission. ...for now?
The laser does nothing to do with AIs. So you won't be exposed by using a visible laser.

Changelog

External link

License