Projectile Factory Actions

v1.0

New Actions are provided that interact specifically with Projectile Factory.

Projectile Spawner Actions

These actions are specific to the ProjectileSpawner class. By default they target the ProjectileSpawner on the Target object, but you can specify one or more ProjectileSpawner components, and choose to target all, a random one, or sequentially β€” iterated each time the action is looped or executed again.

Change Projectile Action

ChangeProjectileAction will change the active Projectile on the ProjectileSpawner. If the Projectile is not already in the spawners list, it will be added.

Launch Projectile Action

This will launch the current projectile, or if you'd like, a new projectile (or one from a List<Projectile>).

Stop Projectile Spawner

Simply stops the ProjectileSpawner that is selected.

Destroy Active Projectiles Action

This will destroy (or pool) all active projectiles that have been spawned by the ProjectileSpawner.

Projectile Actions

These actions are specific to the Projectile class.

Projectile Data to Blackboard

This action will store data about the projectile on the Blackboard, either the global blackboard or the local ActionExecutor blackboard. You can choose to include or exclude specific values such as the GameObject itself, the velocity (Vector3, magnitude & direction), position, rotation, and speed.

The key for each value is based on the UID of the Action, which is visible, and customizable, at the top of the Action in the Inspector. For example, if the UID is "MyProjectile", then the GameObject key would be "MyProjectile_GameObject". You can customize the suffix if you'd like, in which case it would be "MyProjectile_CustomSuffix", etc.

This works great with the Conditionals, as you can then check the values of these data points before executing specific groups of actions.

By default, the blackboard entries will be automatically removed when the projectile is destroyed or disabled.

Projectile Target

SetProjectileTarget will set a new target GameObject on the projectile. Keep in mind you can set the override GameObject via code before executing.

ClearProjectileTarget will remove the current target GameObject from the projectile.

Behavior Management

The ToggleProjectileBehaviorAction will enable or disable (or toggle) a specific behavior. If the behavior is not present on the projectile, it is ignored.

The AddProjectileBehaviorAction and RemoveProjectileBehaviorAction will add or remove specific behavior objects from the selected projectiles.

Observer Mangement

Observers can be added and removed with AddProjectileObserverAction and RemoveProjectileObserverAction.

Collision Maks Handling

Projectile collision masks can be managed with SetProjectileCollisionMaskAction, which sets the exact values, or AddToProjectileCollisionMaskAction and RemoveFromProjectileCollisionMaskAction.

Lifecycle Management

TriggerProjectileColliionAction will immediately trigger the collision at a specific point.

TriggerProjectileDestroyAction will call the Destroy() behavior. ResetProjectileAction will call the Reset() methods, and ReturnProjectileToPoolAction will return the projectile to the Object Pool without calling Destroy().

Last updated