Arma Reforger:Scripting Temporary Feature
Developing or updating a feature may happen over the course of multiple days and sometimes having the ability to switch it on/off for feature or performance comparison is a good thing. Multiple options are available.
Sometimes a bool switch is not a possible solution (due to required data initialisation or other systems, etc). A preprocessor definition can be used:
This is very often used with #ifdef WORKBENCH across Arma Reforger code, allowing code to only be compiled for Workbench usage (saving memory space in game).
A preprocessor value can be defined in two ways:
- preprocessor definition, using #define TAG_ACTIVATE_FEATURE at the top of the file - required in every file that uses it. Can be commented with //
- the scrDefine startup parameter ArmaReforger.exe -scrDefine TAG_ACTIVATE_FEATURE