ITKEnemy - golden-coconut-studio/TikiAdventuresWiki GitHub Wiki
- This is the base class for all enemies. when creating a blueprint for an enemy AI, use this class.
-
Main Properties:
-
General
Enemy Properties: Armor
- Type: int
- Default: 2
- EditAnywhere
- BlueprintReadWrite
- [Min, Max]: [0, 100]
Enemy Properties: RotationSpeed
- Type: float
- Default: 45
- EditAnywhere
- BlueprintReadWrite
- [Min, Max]: [0, 1440]
CombatSlotsRequired
- Type: int
- Default: 1
- EditAnywhere
- [Min, Max]: [0, 100]
- When searching for an attacking target, this will be the free slots this target will need to have in order to attack it.
AvailableEnemyAbilities
- Type: TArray<UAbilitySkill*>
- EditAnywhere
- BlueprintReadWrite
- Array with all the abilities this enemy can use.
PointOfInterest
- Type: AActor
- EditAnywhere
- The actor that the enemy will see in the idle default shoot task
-
Tags
CombatTag
- Type: ECombatTags
- EditAnywhere
LockDecalsArray
- Type: TArray<ADecalActor *>
- VisibleAnywhere
- The color rings that show us what tiki is lock the enemy
SpecialTags
- Type: TArray<ESpecialTags>
- EditAnywhere
UnitTags
- Type: TArray<EUnitTags>
- EditAnywhere
-
AI
BehaviourTree
- Type: UBehaviorTree
- EditAnywhere
ObjectToDefeat
- Type: AActor
- EditAnywhere
- The actor that the enemy must defeat
PawnSensingComponent
- Type: UPawnSensingComponent
- VisibleAnywhere
- Component for sense the enemies
WidgetComponent
- Type: UWidgetComponent
- VisibleAnywhere
- Component to show the enemy life
AttackComponent
- Type: UTK_AttackComponent
- VisibleAnywhere
- Component that allows the enemy to attack
HealtCareComponent
- Type: UTK_HealthCareComponent
- VisibleAnywhere
- Component that allows the enemy to lose life and die
TagComponent
- Type: UTagComponent
- VisibleAnywhere
- Component that allows to add a tag to the enemy
AbilityComponent
- Type: UTK_AbilityComponent
- VisibleAnywhere
- Component that allows to the enemy to use abilities
SpawnLootComponent
- Type: UTK_SpawnLootComponent
- VisibleAnywhere
- Component that allows to the spawn loots when the enemy dies
PeripherialVision
- Type: float
- Default: 90.0f
- EditAnywhere
-
Awake and Alert
bStartsAwake
- Type: bool
- Default: true
- EditAnywhere
- BlueprintReadWrite
bStartsAlerted
- Type: bool
- Default: false
- EditAnywhere
- BlueprintReadWrite
BehaviourOnAwake
- Type: UBehaviorTree
- EditAnywhere
- Instanced
TaskOrdersOnAlert
- Type: TArray<UBTTaskNode*>
- EditAnywhere
- Instanced
AwakeAnim
- Type: UAnimSequence*
- EditAnywhere
AlertAnim
- Type: UAnimSequence*
- EditAnywhere
VisionMeshComponent
- Type: UStaticMeshComponent
- VisibleAnywhere
- Detect the tiki when he is in the attack zone
VisionMeshMaterial
- Type: UMaterial
- EditAnywhere
- Material for the second cone
DefaultVisionPositionForward
- Type: float
- EditAnywhere
- Default position for the second cone
DefaultVisionRotation
- Type: float
- EditAnywhere
- Default rotation for the second cone
InitCourageLevel
- Type: int
- EditAnywhere
- Default initial courage for the enemy
ActualCourageLevel
- Type: int
- EditAnywhere
RealCourageLevel
- Type: int
- EditAnywhere
bPassedHalfLifeLimit
- Type: bool
- Active when the enemy's life down below the half
LoseCourageLevelWhenBelowHalfLife
- Type: int
- EditAnywhere
bPassedQuarterLifeLimit
- Type: bool
- Active when the enemy's life down below the quarter
LoseCourageLevelWhenBelowQuarterLife
- Type: int
- EditAnywhere
SphereTikis
- Type: USphereComponent
- Sphere to detect tikis
GainCourageWhenHighGround
- Type: int
bHighGroundActivated
- Type: bool
- VisibleAnywhere
- Active when the enemy is higher that the tiki
NumTikisHeightRef
- Type: int
- EditAnywhere
- Number of tikis that we need to be higher for gain courage
DistanceToGainCourageWhenTikisFarAway
- Type: float
- EditAnywhere
NumberOfTikisToGainCourage
- Type: int
- EditAnywhere
**GainCourageWhenTikisFarAway **
- Type: int
- EditAnywhere
**bNearbyTikisActivated **
- Type: bool
- VisibleAnywhere
ArrayTikisNearby
- Type: TArray<ATK_Player*>
- VisibleAnywhere
- Tikis nearby to the enemy
SphereEnemies
- Type: USphereComponent
- To detect de nearby enemies
EnemiesOnOverlap
- Type: int
- VisibleAnywhere
DistanceToGainCourageWhenEnemiesNearby
- Type: float
- EditAnywhere
ArrayNumberOfEnemiesToGainCourage
- Type: TArray
- EditAnywhere
ArrayGainCourageWhenEnoughEnemiesNearby
- Type: TArray
- EditAnywhere
ArrayNearbyEnemiesActivated
- Type: TArray
- VisibleAnywhere
ActualBehaviourTree
- Type: FName
- VisibleAnywhere
- The behaviour that runs in this moment
BehaviourOnPanic
- Type: UBehaviorTree
- EditAnywhere
BehaviourOnRetreat
- Type: UBehaviorTree
- EditAnywhere
BehaviourOnNormal
- Type: UBehaviorTree
- EditAnywhere
BehaviourOnConfident
- Type: UBehaviorTree
- EditAnywhere
BehaviourOnSpecial
- Type: UBehaviorTree
- EditAnywhere
-
-
Other Properties:
EnemyController
- Type: AAIController*
-
Functionalities:
Getters & Setters
- Public - Blueprintcallable - GETTERS: returns the value of a given enemy property. - SETTERS: sets the value of a given enemy property.
IsEnemyAlive
ModifyCourage
AddRemoveTikisNearby
AddRemoveEnemiesNearby
OverlapTikisInTheAttackZone
AddRemoveDecal
CheckCorrectTags
- If the enemy has a wrong or no tag, it will show a warning error.
OnPlayerDetected
- If it a pawn, if its a player, call the function OnPlayerDetected() of the AIController.