Level.createProjectile, configure their speed, direction, homing behavior, and explosion rules, then fire them — either automatically at creation or manually in your own code. Every projectile can carry onFire, onExplode, and onUpdate callbacks so you have frame-by-frame control over its behavior.
Creating a Projectile
The simplest signature creates a projectile using an inline property table:ProjectileRequest object instead of a table.
Full Property Table
All fields exceptskin, origin, and rotation are optional.
Using ProjectileRequest
ProjectileRequest is a class alternative to the inline table. It is useful when you want to build the configuration incrementally or reuse a base configuration.
Querying Available Skins
The Projectile Object
Level.createProjectile returns a Projectile. You can read and write its properties after creation, and call methods to fire or detonate it manually.
Key Properties
Fire and Explode
The OnProjectileCollide Hook
Any entity script can define OnProjectileCollide to react when a projectile hits it: