Saving Triggers - gruppe-adler/grad-persistence GitHub Wiki

You can save triggers by setting the saveTriggers attribute in CfgGradPersistence to 1 or 2. Trigger status (activated / not activated), as well as most of its properties will be saved.

To avoid a duplicates being loaded, give each trigger a variable name.

Re-Execution

If you set saveTriggers = 2;, any trigger that had been activated before the mission was saved, will have its statements re-executed on mission load. If you want to decide this on a per-trigger basis, you can do _trigger setVariable ["grad_persistence_reExecute",_reExecute], where _reExecute is bool.

Limitations

The trigger's server only option in Eden is lost during mission saving (createTrigger makeGlobal parameter). Conversely this also means that you can only save triggers that are known to the server. If you created a trigger with a client-local script, that trigger will not be saved.

Be careful with using thisList in your trigger statements, if you want re-execution. The thisList array is not updated every frame, so it might be empty when the trigger is re-executed on mission load.