Attacks Array
Last updated
Last updated
The Attacks Array stores all of the attacks your AI is capable of using as well as the conditions needed for that attack to be used. Attacks should be in order of priority so that attacks with the most conditions (least likely to be executed) are at the top and attacks that have no conditions (default attacks) are at the bottom. Attacks can even be setup for randomization, with those not chosen for randomization remaining at the top, in the order you have chosen, and the random attacks are shuffled and added to the bottom.
Universal Monster attacks all use Montages and Montage Notifications to determine when an attack should be activated.
Data Table Row: You can store your attacks in a data table. Montage: The animation montage to play for this attack. Type: Attack type, which can be Melee, Projectile, Special, Timer or Bullet. Damage Type: Damage type class to be used when applying damage. Projectile: If Type is Projectile, use these settings. Special: If Type is Special, use these settings. Randomize?: Should this attack be randomized with other attacks also chosen for randomization? Trace: The trace info to use for this attack. Self Conditions: Conditions of the AI that are needed for this attack to be used. Target Conditions: Conditions of the AI's target that are needed for this attack to be used. Costs: Does this attack have a cost? Any stat can be used for the cost and if the AI does not have the necessary stats available, it will not use the attack. Effects: On the target(s) that are hit by this attack, what effects should be used? Sound, Particle Effect, Knockback, Status (Timer), Stun and Custom (run custom event/function). Hit State: What type of Hit Animation should the hit target play? Min Range: Minimum range for the attack to be chosen. Max Range: Maximum range for the attack to be chosen. Min Damage: Minimum damage for the attack. Max Damage: Maximum damage for the attack. Crit Chance: Chance, from 0.0 to 1.0, of dealing a critical hit. Crit Multiplier: The amount to multiply damage when dealing a critical hit. Cooldown: How long must the AI wait in order to use this attack again? Cooldown Variance: Add randomization to the cooldown. Cooldown +/- Cooldown Variance. Current Cooldown: You do no need to set this. When an attack is on cooldown, the game time until the attack can be used again will be stored here. Task Info: Task Info to use when using the "Use Attack Task Info" override in the Task Info of a Task.
The following sections will cover setting up the Montages and Montage Notifications as well as the specific configurations needed for those particular types of attacks.
Multiple types of attacks in the Combat System will utilize Trace Info so this will be covered in a separate section which you can access below.
Multiple systems in Universal Monster will utilize Conditions so this will be covered in a separate section which you can access below.
As long as you setup your Stats interface functions, you can utilize the Costs to have each attack check the current value of any stat and reduce (or increase if set to negative values) the value of that stat when the attack is performed. You can add multiple costs per attack.
Stat: Choose the Stat you wish to affect. Value: The amount required for the attack.
When targets are hit, you can apply unlimited Hit Effects. You can play a Sound, spawn a Particle effect, Knockback and/or Stun the target, inflict a Status effect, and even run your own Custom event/function. Each Effect has its own set of info to configure.
Transform is used to make adjustments to each of the Effects and is explained for each type below.
Transform: Offsets the location and rotation of the Sound effect.
Particle Timer: The BP_UMTimer that contains the Particle effect. Duration: Time, in seconds, to show the Particle effect. Transform: Offsets the location and rotation as well as sets the scale of the Particle effect.
Direction: Directly added to the angle of attacker to hit target. Strength: The power of the Knockback. XY Override: Replace the XY component of the hit target's velocity instead of adding to it? Z Override: Replace the Z component of the hit target's velocity instead of adding to it? Transform: Rotation is used to rotate the Direction.
Duration: Time, in seconds, until the Stun is completed. Use Animation?: Should the Stun animations in the animation blueprint be used? Transform: Does nothing.
Transform: Does nothing since Status effects are attached directly to the target.
Integers: Array of integers for you to use in your custom event/function. Floats: Array of floats for you to use in your custom event/function. Strings: Array of strings for you to use in your custom event/function. Transforms: Array of transforms for you to use in your custom event/function. Booleans: Array of booleans for you to use in your custom event/function. Transform: You choose what it does in your custom event/function.
The Custom Hit Effect will call the HitEffect interface function. See the BPI_UniversalMonster section for more information. Link provided below.
For more information on how to use the Task Info, click the link below.