ProjectileBlueprint2D

Inherits: Resource < RefCounted < Object

Class representing the model and desing of a Projectile2D.


Description

Projectile Blueprints are custom Godot Resources, and like Textures and Materials they only serve as data containers. Projectile Blueprints are used by the AP engine to create the real-time Projectile Objects.

Note: Do not change the ProjectileBlueprint2D at run time, these serve strictly as static data. Any changes you want to make at runtime must be made to the Projectile2D themselves through the Callables passed in the ProjectileCaller2D request_projectile method.


Properties



Enumerations

enum ProjectileDirectionality:


enum ProjectileSpread:


enum ProjectileType:



Property Descriptions

float after_hit_angular_speed = 0

Angular speed used in seeking projectiles after the first hit (Useful for ricochet behaviors).


bool allow_rehit = false

If true the projectile will be able to hit already hit targets.


float angular_speed = 0

Max distance rotated in degrees per second in seeking projectiles.


float angular_spread = 0

Fixed radial extension in which angular spread projectiles will evenly distribute (in degrees).


bool area_monitoreable = true

AREA Projectiles ONLY

If true the projectile can interact with other areas.


float cast_radius = 200

Radius of the sphere cast used to search for secondary targets on seeking projectiles.


int collision_layer = 0

Physics layers of the projectile itself.


int collision_mask = 0

Physics layers that can interact with this projectile.


String collision_path = "Collision"

INSTANTIATED Projectiles ONLY

Path to the mandatory Area2D element or child component in the Projectile2D instance Scene.


int damage = 1

Sum of health points that this projectile removes from targets.


PackedScene instance

INSTANTIATED Projectiles ONLY

The Scene to instantiate as a Projectile2D.


int instances = 1

Amount of projectiles to instantiate.


float lifetime = 1.0

Active duration in Seconds.


float linear_deviation = 0

Random amount of deviation the velocity vector of the projectile can differ once instantiated (in pixels).


float linear_speed = 1000

Distance traveled in Pixels per Second.


bool lock_to_target = false

If true the projectile will ignore all potential collisions in the way to hit its assigned target.


bool look_at = true

If true the projectile will actively look at the direction it travels.


ProjectileBlueprint2D on_expired_projectile

Secondary projectile to be instantiated once the main projectile runs out of pierce or runs out of lifetime.


String on_hit_call = "damage"

Name of the method that the projectile will call upon collision (On the objects it collided with).


int pierce = 1

How many different targets this projectile can Hit.


ProjectileDirectionality proj_directionality = 2

The type of direction the projectiles will take once instantiated.


ProjectileSpread proj_spread = 0

The type of spread the projectile instances will take once instantiated.


ProjectileType proj_type = 0

Specific projectile sub-class this projectile will use.


int radius = 50

Size of the projectile Collision in pixels (The Collision radius of the projectile is affected by the size of the projectile itself).


bool randomize_positions = false

If true the linear and angular projectiles positions will be randomly spread.


float rehit_cooldown = 0.1

Minimum amount of time between consecutive collisions.


int seeking_mask = 0

The projectile will actively seek targets on these Collision layers. Use it so your projectiles don't seek into walls.


bool seeking = false

If true the projectile will actively follow its targets.


float size = 1.0

Applied uniform Scale of the projectile.


Texture2D texture = null

AREA Projectiles ONLY

Main projectile graphic texture.


float vertical_spread = 0

Fixed amount of linear extension in which linear and angular projectiles will be evenly distributed (in pixels).