AttackBlueprint2D
Inherits: Resource < RefCounted < Object
Class representing the model and desing of an Attack2D.
Description
Attack Blueprints are custom Godot Resources that serves as templates defining the configuration of your projectile-based attacks. Attack Blueprints are used by the AP engine in conjunction with ProjectileManager2Ds to convert a constant Input request into an orderly timed projectile barrage.
With Attack2D:

func _process(_delta: float) -> void:
if Input.is_mouse_button_pressed(MOUSE_BUTTON_LEFT):
projectile_manager.request_execution(0, 0, position, get_global_mouse_position())
Without Attack2D:

func _process(_delta: float) -> void:
if Input.is_mouse_button_pressed(MOUSE_BUTTON_LEFT):
projectile_manager.request_projectile(0, position, get_global_mouse_position())
Note: Do not change AttackBlueprint2Ds at run time, these serve strictly as static data. Any changes you want to make at runtime must be done on the Attack2D themselves, through any of the ProjectileManager2D methods.
Good:
projectile_manager.get_attack(0).set_property("attack_duration_time", 2.0)
Also Good:
projectile_manager.get_attack(0).attack_duration_time = 2.0
Bad:
projectile_manager.get_attack_blueprint(0).attack_duration_time = 2.0
Horrible:
projectile_manager.get_attack(0).resource.attack_duration_time = 2.0
Tutorials
Properties
Property Descriptions
float attack_anticipate_time = 0
Duration of the anticipation phase in seconds.
float attack_charge_time = 0
Duration of the charge phase in seconds.
float attack_duration_time = 0.1
Duration of the main attack phase in seconds.
Vector2 attack_offset = Vector2.ZERO
Added distance to projectile position on creation.
float attack_recovery_time = 0
Duration of the recovery phase in seconds.
AttackChargeTrigger charge_trigger = 0
Charge completion condition.
AttackChargeType charge_type = 2
Charge accumulation tracking method.
OnInterruptedExecutionContinuation continuation_type = 0
ONE_BY_ONE attacks behavior when resuming interrupted attacks.
ExecutionType execution_type = 0
ONE_BY_ONE attacks continuation condition.
Dictionary[StringName, Variant] global_properties = {}
This dictionary is shared between all attacks created by this blueprint.
If you change its values on any of its attacks, you will change them in all the rest.
Dictionary[StringName, Variant] individual_properties = {}
This dictionary is independent in all attacks created by this blueprint.
Modifying it will only affect the targeted attack.
StringName name
Unique identifier. Used to distinguish between different attacks on the Global Database.
bool override_attack_duration = true
If true
overrides the attack_duration_time property with its assign projectile spawn_interval value.
bool override_direction = false
If true
the attack ignores the given requested destinations and uses its own ProjectileManager2D Node right direction instead. See Transform2D.x.
bool override_position = false
If true
the attack ignores the given spawn positions and uses its own ProjectileManager2D node global position instead.
InstancesSpawnType spawn_type = 0
Determines the spawning method of projectiles with multiple instances and with timed spawn intervals:
- ALL_AT_ONCE: All projectile instances spawn simultaneously.
- ONE_BY_ONE: Projectile instances spawn sequentially with delays.