Module Managers

Module managers are components on the vehicle that store, use, or operate specific types of modules loaded at a vehicle's module mounts. They also provide an easy way to access functionality on the vehicle (including modules) from scripts outside the vehicle such as input scripts.

Module managers extend the Module Manager base class, which provides two important functions you can override.

  • On Module Mounted - called when a module is mounted on any of the vehicle's module mounts

  • On Module Unmounted - called when a module is unmounted from any of the vehicle's module mounts

For example, the Triggerables Manager component is a Module Manager. Using the above functions, it checks if a module is triggerable (has a Triggerable component) and if it is, stores the Triggerable component in a list where it can easily be found by the input scripts for firing weapons.

The core vehicle systems (Triggerables Manager, Weapons, Health, Tracker etc) are Module Managers. This component can also be used as a base class for any component that needs access to modules for any reason.

Last updated