> ## Documentation Index
> Fetch the complete documentation index at: https://entities.lodemc.net/llms.txt
> Use this file to discover all available pages before exploring further.

# Projectiles

> Custom projectiles, missiles, orbitals, totems, beams, chains, vanilla shots and ray traces.

Things that fly. The custom projectiles (`projectile`, `missile`, `orbital`, `totem`, `beam`, `chainmissile`) are invisible on their own: they move a point through the world and run **skills** as they go, so you decide what they look like and what they do.

```yaml theme={null}
  effects:
  - missile{onTick=shard_trail;onHit=shard_hit;velocity=8;inertia=1.2;maxRange=32} +onTimer:60 @target
  shard_trail:
  - particle{p=end_rod;a=2} @origin
  shard_hit:
  - damage{a=6}                       # no targeter: acts on what it hit
  - particle{p=crit;a=20} @origin
```

Inside a projectile's skills, `@origin` is the projectile's current position. In `onHit`, the entities it hit are the inherited targets, so a line with no targeter acts on them.

| Mechanic | Usage | What it does |
| :- | :- | :- |
| `arrowvolley` | `arrowVolley{amount=20;spread=45;velocity=20}` | Fires a spread of arrows. |
| `beam` | `beam{duration=20;material=END_ROD;onHit=<skill>}` | A beam between the caster and the target that hits what it crosses. |
| `chain` | `chain{onBounce=<skill>;bounces=2;radius=5;delay=1}` | Runs a skill that bounces from target to target. |
| `chainmissile` <sub>also `cmi`</sub> | `chainMissile{bounces=2;radius=5;onHit=<skill>}` | A homing projectile that jumps to new targets on hit. |
| `missile` <sub>also `mi`</sub> | `missile{onTick=<skill>;onHit=<skill>;velocity=5;inertia=1.5}` | A homing projectile that steers toward the target. |
| `modifyprojectile` | `modifyProjectile{trait=VELOCITY;action=MULTIPLY;value=<n>}` | Changes the projectile that is running this skill (speed, range, …). |
| `orbital` <sub>also `o`</sub> | `orbital{radius=2;points=1;onHit=<skill>;duration=200}` | Projectiles circling the target, hitting what they touch. |
| `projectile` <sub>also `p`</sub> | `projectile{onTick=<skill>;onHit=<skill>;velocity=5;maxRange=40;bullettype=NONE}` | Launches a custom projectile that runs skills on tick, on hit and on end. |
| `projectilevelocity` <sub>also `pvelocity`</sub> | `projectileVelocity{vx=0;vy=0;vz=0;mode=SET}` | Sets the velocity of the projectile running this skill. |
| `raytrace` | `raytrace{maxdistance=50;entityskill=<skill>;locationskill=<skill>}` | Traces a line forward and runs skills on the entity or block it hits. |
| `raytraceto` | `raytraceTo{entityskill=<skill>;locationskill=<skill>}` | Traces a line to the target and runs skills on what it hits. |
| `setprojectilebulletmodel` | `setProjectileBulletModel{model=<n>}` | Sets the custom model data of the running projectile's bullet. |
| `setprojectiledirection` | `setProjectileDirection{magnitude=1}` | Points the running projectile at the target. |
| `shoot` <sub>also `shootprojectile`</sub> | `shoot{type=arrow;damage=5;velocity=1}` | Shoots a vanilla projectile (arrow, trident, …) at the target. |
| `shootfireball` <sub>also `fireball`</sub> | `shootfireball{yield=1;incendiary=false;velocity=1;small=false}` | Shoots a fireball at the target. |
| `shootpotion` | `shootPotion{type=<effect>;duration=100;level=1;velocity=1}` | Throws a splash potion at the target. |
| `shootshulkerbullet` <sub>also `shootshulker`</sub> | `shootShulkerBullet{onHit=<skill>}` | Shoots a shulker bullet at the target. |
| `shootskull` <sub>also `shootwitherskull`, `witherskull`, `skull`</sub> | `shootSkull{yield=1;velocity=1}` | Shoots a wither skull at the target. |
| `terminateprojectile` <sub>also `endprojectile`, `terminateproj`, `endproj`, `stopprojectile`, `stopproj`</sub> | `terminateProjectile` | Ends the projectile running this skill. |
| `totem` <sub>also `toteme`, `t`</sub> | `totem{charges=0;onTick=<skill>;onHit=<skill>;duration=400}` | A stationary projectile that runs skills on what comes near it. |
| `volley` <sub>also `shootvolley`</sub> | `volley{type=arrow;amount=10;radius=10}` | Fires several vanilla projectiles at once. |

## Bullets

A custom projectile can carry something to look at with `bullettype`: `ARROW`, `BLOCK` or `SMALLBLOCK` (a block display), `TEXT`, `MOB` (a LodeEntities mob or vanilla entity riding along), or `MODELENGINE` (a model). The default, `NONE`, is invisible. `setProjectileBulletModel` changes the bullet's custom model data mid-flight.

## Firing on an animation frame

For an attack that leaves the mob's hand on the right frame of its animation, call the skill from a keyframe in Blockbench rather than guessing a `delay`. See [Animating Your Model](https://entities.lodemc.net/animating-a-model.md#effects-on-an-animation-frame).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.