


However if you want to add persistent data caching, then you can use the database system that is proposed with GCS. until the mission is changed or the server shutdown). This can be used as long as your usage of this system is link to the mission life time (ie. Persistenceīy default, GCS will use in-memory caching, this means that all the data will simply be stored in local array. Also, the distance between GCS_VAR_SIZE_ACTIVATION_SQUARE_GRID and GCS_VAR_SIZE_UNSPAWN_SQUARES must be large enough too to avoid players spawning and unspawning the AI units and vehicles all the time (or cause a potentially problematic desynchronisation between the cached data and the spawned data). Ideally, the distance between GCS_VAR_SIZE_SQUARE_GRID and GCS_VAR_SIZE_ACTIVATION_SQUARE_GRID must be large enough to prevent the player from seeing the spawn of AI units and objects, this will depend heavly on type of map though.

If all the players leaves the blue square (unspawn area), then all the AI units and vehicles in the black square will be cached and unspawned. Here is a simple 2D visual representation of a single grid square:Īll the AI units and vehicles inside the black square will be spawned if one or more player enter the red square (activation area).

GCS_VAR_SIZE_UNSPAWN_SQUARES - Represents the trigger distance where AIs and vehicles will be cached and removed GCS_VAR_SIZE_ACTIVATION_SQUARE_GRID - Represents the trigger distance where AIs and vehicles will be created GCS_VAR_SIZE_SQUARE_GRID - Represents the total size of each grid
