MF_B_HardpointControl : MF_AbstractPlatformControl
Controls the behavior of a fixed platform, and coordinates its weapons. Since the weapons aren’t aimed, the unit must aim them by maneuvering. You’ll probably want the navigation target and weapon target to be the same to make the unit aim properly.
Inherited Variables
targetingScript, weapons, curWeapon
Public Variables
target : GameObject
Current target of the platform. This will either be supplied by the targeting script, or be assigned directly. However, if the platform is choosing its own targets with a targeting script, this may immediately be overwritten.
controller : ControlType enum { AI_AutoTarget, None }
AI_AutoTarget: AI will use a scanner and a targeting script to pick targets. If no targeting script is picking targets, you may directly assign a target.
None: Platform is deactivated.
alternatingFire : bool
When using multiple weapons, you can choose to have them all fire at once, or alternate shots between them. If alternating, the delay before the next weapons fires is the cycleTime of the weapon at index 0 divided by the number of weapons. This will produce odd results if you have weapons with different rates of fire.
fullBurst : bool
Upon firing, weapons will finish a full burst according to their burst fire setting.
checkLOS : bool
Uses Raycast to check line of sight before firing.
losCheckInterval : float
Increase time between Raycast line of sight checks to improve performance. 0 = before every shot.
checkTargetSize : bool
This script tries to determine the target size when choosing whether or not to fire. This way, it will fire even if not aimed directly at the target center. It approximates the size of the target using its largest dimension of any root collider component. If no collider is found, it will look for a collider in the root child index 0. If still none found, it will use targetSizeDefault.
targetSizeDefault : floatIf no target size can be found, you can set a default size for the the weapons to fire at.
Controls the behavior of a fixed platform, and coordinates its weapons. Since the weapons aren’t aimed, the unit must aim them by maneuvering. You’ll probably want the navigation target and weapon target to be the same to make the unit aim properly.
Inherited Variables
targetingScript, weapons, curWeapon
Public Variables
target : GameObject
Current target of the platform. This will either be supplied by the targeting script, or be assigned directly. However, if the platform is choosing its own targets with a targeting script, this may immediately be overwritten.
controller : ControlType enum { AI_AutoTarget, None }
AI_AutoTarget: AI will use a scanner and a targeting script to pick targets. If no targeting script is picking targets, you may directly assign a target.
None: Platform is deactivated.
alternatingFire : bool
When using multiple weapons, you can choose to have them all fire at once, or alternate shots between them. If alternating, the delay before the next weapons fires is the cycleTime of the weapon at index 0 divided by the number of weapons. This will produce odd results if you have weapons with different rates of fire.
fullBurst : bool
Upon firing, weapons will finish a full burst according to their burst fire setting.
checkLOS : bool
Uses Raycast to check line of sight before firing.
losCheckInterval : float
Increase time between Raycast line of sight checks to improve performance. 0 = before every shot.
checkTargetSize : bool
This script tries to determine the target size when choosing whether or not to fire. This way, it will fire even if not aimed directly at the target center. It approximates the size of the target using its largest dimension of any root collider component. If no collider is found, it will look for a collider in the root child index 0. If still none found, it will use targetSizeDefault.
targetSizeDefault : floatIf no target size can be found, you can set a default size for the the weapons to fire at.