This is a cloaking script I made for another mission maker. This script replicates a Crysis/Predator style cloaking device where the area around/behind the unit is distorted by the cloak so they are still slightly visible. Player units can be granted the cloak and will be able to activate it through the action menu (ACE self interaction if using ACE) if they are wearing the required equipment. AI units cannot cloak themselves but can be cloaked using functions provided on the GitHub or via Zeus Enhanced modules. Cloaked units cannot be damaged by bullets due to the collision being disabled when the player model is hidden but will still take damage from most other damage sources.
This also contains an 'Active Camouflage' script made by Twiznak which allows certain vehicles to have their hidden selection textures changed to a PIP texture generated based on the surrounding terrain. Currently this is only aesthetic and does nothing to hide the vehicle from AI.
You can see the script in action in this demo video or if you'd like to test the script for yourself, you can try out the demo mission.
This is the script version, a mod version is also available on the Steam Workshop.
- Configurable settings so you can use the script how you like
- Display to keep track of cloak status
- Cloak activation/deactivation sounds
- AI will not detect cloaked units
- Can cloak AI units
- Vehicle active camouflage (Thanks to Twiznak)
- Designed for multiplayer and tested on dedicated server
- Compatible with ACE
- Useable from Zeus via Zeus Enhanced
- Editor modules to simplify usage (Mod version only!)
ZEN Modules:
- Change Settings
- Cloak Unit(s)
- Give Cloak
- Give Active Camo
- Remove Cloak
Editor Modules (MOD VERSION ONLY):
- Cloak Settings
- Give Cloak
- Give Active Camo
For help with troubleshooting, questions or feedback, join my Discord
This script is licensed under Arma Public License Share Alike (APL-SA).
- English
- Polish (Translation by honger)
If you'd like to translate the script into a different language, contact me via my Discord or create a pull request.
- Players of the Task Force Dingo community who helped bulk test the script during a weekly mission night.
- Twiznak, for providing the code necessary for the vehicle active camo functionality. You should check out his workshop items.
- Majestic Iranian Kebab, for providing the code tweaks necessary for collision to work.
NOTE: If using these examples in a trigger, the trigger must NOT be server only!
Give cloak to all players:
// put in initPlayerLocal.sqf or trigger 'On Activation' box
// gives all players 30 seconds of cloaking with a 60 second cooldown
// NOTE: player must still have the correct equipment to cloak
[player, 30, 60] spawn tts_cloak_fnc_giveCloak;
Give cloak to a subset of players:
// put in initPlayerLocal.sqf or trigger 'On Activation' box
private _maxDuration = 30; // Maximum cloak duration in seconds
private _cooldown = 5; // Cooldown time in seconds
private _cloakUnits = ["unit_1", "unit_2", "unit_3"]; // List of unit varnames that have cloaking devices
if (vehicleVarName player in _cloakUnits) then {
[player, _maxDuration, _cooldown] spawn tts_cloak_fnc_giveCloak;
};
NOTE: I don't recommend giving/removing a vehicle's active camouflage ability mid-mission since it interferes with Zeus/Spectator. The option is still available if you need to.
Give active camo to vehicle:
// put in init.sqf or trigger 'On Activation' box
// gives 'cloakVic' 2 minutes of active camouflage with a 5 minute cooldown
[cloakVic, "cloakVic", 120, 300] spawn tts_cloak_fnc_giveVehicleCloak;
Read below for complete changelog history.
- Added Polish translation by honger.
- Fixed duplicate ACE actions being created when respawning.
- Updated ZEN functions to be consistent with other TTS scripts.
- When ACE is enabled the cloak actions will now use ACE actions instead.
- Added stringtable support to allow the script to be translated. If you are willing to help translate the script into another language, contact me in my Discord!
- Added 2 new functions,
fn_addCloakActions
andfn_addVehicleCloakActions
. These are executed locally on players to allow localisation of the action text.
- Cleaned up README file, improved instructions, added some more examples and documentation for the different functions.
- Fixed bug that caused cloaked players to remain invisible to the host player after uncloaking in locally hosted multiplayer games.
- 'Cloak Unit' ZEN module has been renamed to 'Cloak Unit(s)' and now has a second parameter that will apply the cloak effect to the unit's group if enabled.
- Added custom ZEN icons.
- Implemented Majestic Iranian Kebab's collision fix (NOTE: Local player's character will no longer be hidden when in third person).
- Removed need to execute
fn_initCloak
andfn_customZeusModules
manually. - Removed Achilles compatibility (no longer supported).
- Added Twiznak's active camouflage functionality for vehicles using PIP cameras.
- Added 'Give Active Camouflage' module to allow dynamic adding of vehicle active camo.
- Added ability to remove vehicle active camo using 'Remove Cloak' module.
- Minor tweaks to hopefully make the script more JIP compatible.
- Cloaking AI now properly prevents them from shooting while they are cloaked by disabling "TARGET" and "AUTOTARGET" AI, will preserve state if the AI had this disabled already before cloaking.
- Fixed a typo in
fn_giveCloak
which would cause issues with interaction menu actions. - Added a new setting and display to show/hide vehicle camo UI seperately to cloak UI.
- Tweaked particles slightly to decrease unit visibility.
- Adjusted
fn_customZeusModules
slightly so it should correctly add the modules more reliably.
- Fixed positioning and size of some particle drop points.
- Made parameters global variables instead of parameters for init so they can be changed on the fly easier.
- Added compatibility for Achilles/ZEN.
- Added possibility to use headgear as cloak requirement as well.
- Fixed sound sources not being created at correct position when units were not near terrain.
- Adjusted cloak in/out transition to be created at centre of mass instead of feet.
- Initial upload to GitHub.