Git Product home page Git Product logo

arma3-2d-mask-overlay's Introduction

Arma 3 - [MP Compatbile] Gas Mask/Helmet Overlay

This is a heavily modified version of the overlay from the script "Radiation - DEMO" made by ALIAS. The script is intended for use with multiplayer missions. With minor modification the script will work with singleplayer.

When a player respawns the player object is changed to new one, this esentially renderes scripts for overlay useless in mulitplayer. To overcome this, the script uses a Respawn Handler created in the unit_init.sqf. When a player respawns the handler invokes the gasmask.sqf with arguments pointing to the current player object.

How to use

Edit gasmask.sqf and change line 4 to the equipment you want to trigger the overlay. In the below example the equipment is set to G_Balaclava_blk protection = "G_Balaclava_blk";

Change line 28 from (goggles _unit isEqualTo protection) to (headgear _unit isEqualTo protection) if the item which you want is located in a different slot, like headgear.

Notes:

  • If you wish to use the Arma 3 Contact DLC cbrn gear, keep in mind that the unit (cbrn_specialist) spawns with "G_AirPurifyingRespirator_01_nofilter_F" and later respawns with "G_AirPurifyingRespirator_01_F".
  • If you whish to change the default sounds provided with this script, you can find free samples here https://freesound.org/home/. Audacity can be used to edit the sound according to your needs and exported to .ogg format.

Features:

  • gasmask.sqf compiled to memory and lodaded from there instead of reading from disk each time.
  • Custom overlays
  • Custom sounds for equip/uneqip & breathing.
  • Multiplayer compatible
  • Compatible with respawns

Known issues:

  • Gas mask overlay will remain after respawn until the player equips and then unequips the "Gas mask"

To-Do:

  • Remove the overlay effect after respawn
  • Optimize the code to have less impact on the client
  • Create a singleplayer version of this script

Lessons learned:

  • gasmask.sqf and unit_init.sqf had functions with the same name "fnc_overlay". This essentially froze the script, keep that in mind if you modify this script.

Credits for the original script to ALIAS.

https://steamcommunity.com/sharedfiles/filedetails/?id=909790601

arma3-2d-mask-overlay's People

Contributors

35mpded avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.