MF_EasyScan : MF_EasyScan_Targeting
This is the core component that includes unit classification, unit detection, and targeting logic. It inherits from MF_EasyScan_Targeting. Only one MF_EasyScan script should be a part of a single unit. For additional targeting logic, add MF_ES_TargetingOnly scripts.
Public Methods
SetScanRange : void ( max : float )
SetScanRange : void ( max : float , angle : float )
Sets the scan range, as well as any angle arc limitation.
This is the core component that includes unit classification, unit detection, and targeting logic. It inherits from MF_EasyScan_Targeting. Only one MF_EasyScan script should be a part of a single unit. For additional targeting logic, add MF_ES_TargetingOnly scripts.
Public Methods
SetScanRange : void ( max : float )
SetScanRange : void ( max : float , angle : float )
Sets the scan range, as well as any angle arc limitation.
Inherited Public Methods
AddEventTarget() ChooseNewTarget() GetTarget() GetVelocity() GetVelocityMagnitude() GetVelocitySqrMagnitude() RemoveEventTarget() SetFilterWeaponRange() SetTargetingRange() |
GetArmor()
GetArmorMax() GetCustomStat() GetCustomStatMax() GetEnergy() GetEnergyMax() GetHealth() GetHealthMax() GetShield() GetShieldMax() GetThreat() GetThreatMax() GetCustomStat() GetCustomStatMax() GetTotalStrength() GetTotalStrengthMax() Stat items require another script to implement an interface for stat retrieval. |
Public Variables
detectable : enum Detectable { ByScanner, Always, Never }
Determines how this unit can be detected by other factions. Factions are always aware of same faction units.
By Scanner - Must be scanned.
Always - Will always be detected regardless of range and line-of-sight.
Never - Will never be detected, unless by ally and sharing scan with allies.
targetable : enum Targetable { ByAny, BySameFaction, BySelf, Never }
Determines how this unit may be targetd.
ByAny - Any unit may target this unit.
ByAllies - Can only be targeted by allies and same faction.
BySameFaction - Can only be targeted by the same faction.
BySelf - Can only be target by self. (Must also have mayTargetSelf set to true.)
Never - Will never be targeted by any unit.
class1 : enum Class1 { Unknown, Tiny, Small, Medium, Large, Huge }
This enum may be changed to custom values.
The class1 of this unit.
class2 : enum Class2 { Unknown, Weak, Normal, Elite, Boss }
This enum may be changed to custom values.
The class2 of this unit.
role1 : enum Role1 { Unknown, Tank, Support, Carrier, DPS, Heal }
This enum may be changed to custom values.
The role1 of this unit.
role2 : enum Role2 { Unknown, Short, Medium, Long }
This enum may be changed to custom values.
The role2 of this unit.
detectedByFaction : float[]
Only visible during runtime, each element will correspond the factions matching enum FactionType populated at runtime automatically.
These floats contain the time detected status will expire for this unit for each faction. These values are updated by the scanner function of MF_EasyScan.
scannerActive : bool
If true, allows scanning functions. If false, no scan will performed. Even with no scan running, other units of the same faction could perform scan functions to find units, allowing this unit to still use targeting.
scannerInterval : float
How oftent he scanner will perform a scan. This value (+0.1f) is used in a scanned unit's detectedByFaction entry to mark when the scan expires. A scan of 1f seconds, also means a scanned unit will be "visible" to that faction for 1.1f seconds if not refreshed sooner.
range : float
The max range of the scanner.
scanAngle : float [Range 0f, 360f]
An optional angle arc limitation of the scanner.
shareWithAllies : bool
Any ally factions listed on MF_EasyScan_UnitList will also get detection visiblilty updated.
scanRequiresLos : bool
A linecast will be performed to potential units, if blocked, they won't be scannerd, unless that unit is marked as always detected.
scanLosLayerMask : LayerMask
Specifies which layers can block line-of-sight. Typical usage would be to have walls and tarrain block LoS without being blocked by other units .
detectable : enum Detectable { ByScanner, Always, Never }
Determines how this unit can be detected by other factions. Factions are always aware of same faction units.
By Scanner - Must be scanned.
Always - Will always be detected regardless of range and line-of-sight.
Never - Will never be detected, unless by ally and sharing scan with allies.
targetable : enum Targetable { ByAny, BySameFaction, BySelf, Never }
Determines how this unit may be targetd.
ByAny - Any unit may target this unit.
ByAllies - Can only be targeted by allies and same faction.
BySameFaction - Can only be targeted by the same faction.
BySelf - Can only be target by self. (Must also have mayTargetSelf set to true.)
Never - Will never be targeted by any unit.
class1 : enum Class1 { Unknown, Tiny, Small, Medium, Large, Huge }
This enum may be changed to custom values.
The class1 of this unit.
class2 : enum Class2 { Unknown, Weak, Normal, Elite, Boss }
This enum may be changed to custom values.
The class2 of this unit.
role1 : enum Role1 { Unknown, Tank, Support, Carrier, DPS, Heal }
This enum may be changed to custom values.
The role1 of this unit.
role2 : enum Role2 { Unknown, Short, Medium, Long }
This enum may be changed to custom values.
The role2 of this unit.
detectedByFaction : float[]
Only visible during runtime, each element will correspond the factions matching enum FactionType populated at runtime automatically.
These floats contain the time detected status will expire for this unit for each faction. These values are updated by the scanner function of MF_EasyScan.
scannerActive : bool
If true, allows scanning functions. If false, no scan will performed. Even with no scan running, other units of the same faction could perform scan functions to find units, allowing this unit to still use targeting.
scannerInterval : float
How oftent he scanner will perform a scan. This value (+0.1f) is used in a scanned unit's detectedByFaction entry to mark when the scan expires. A scan of 1f seconds, also means a scanned unit will be "visible" to that faction for 1.1f seconds if not refreshed sooner.
range : float
The max range of the scanner.
scanAngle : float [Range 0f, 360f]
An optional angle arc limitation of the scanner.
shareWithAllies : bool
Any ally factions listed on MF_EasyScan_UnitList will also get detection visiblilty updated.
scanRequiresLos : bool
A linecast will be performed to potential units, if blocked, they won't be scannerd, unless that unit is marked as always detected.
scanLosLayerMask : LayerMask
Specifies which layers can block line-of-sight. Typical usage would be to have walls and tarrain block LoS without being blocked by other units .
Inherited Public Variables
targetingActive
targetingInterval
rangeMin
rangeMax
targetingAngle
mayTargetSelf
targetRequiresLoS
targetLosLayerMask
targetRelations
filters
filterBlockImportancekeepValidTarget
prefix
priority
relativeTo
otherObject
audioBlock
eventTargets
targetingActive
targetingInterval
rangeMin
rangeMax
targetingAngle
mayTargetSelf
targetRequiresLoS
targetLosLayerMask
targetRelations
filters
filterBlockImportancekeepValidTarget
prefix
priority
relativeTo
otherObject
audioBlock
eventTargets