Mechanic: Missile
The missile skill is similar to the projectile skill. Missiles however are homing and will track down their targets. The available syntax is very similar to that of the projectile skill, too, but has some distinct differences. Missiles cannot be summoned as the "METEOR"-type and cannot hug the surface. However you can edit the inertia, add an onStart-skill and specify wether or not the missiles can only hit their targets.
Added in 4.10
- Missiles can now target locations
- Added targetYoffset to missile mechanic
Attributes
Attribute | Aliases | Description | Default Value |
---|---|---|---|
Inertia | in |
Sets the "turning-rate" of the missile. Lower values make the missile turn around faster. Use big numbers (10-100) when trying to make your missiles turn slowly. |
1.5 |
onTick | oT | Meta-Skill executed every [interval] ticks at the projectile's origin location. | None |
onHit | oH | Meta-Skill executed when the projectile hits something. Targets hit are inherited by the meta-skill. | None |
onEnd | oE | Meta-Skill executed when the projectile ends. |
None |
onStart | oS | Meta-Skill executed when the projectile starts. | None |
Interval | i, int | How often (in ticks) the projectile update | 4 |
HorizontalRadius | hRadius, hR, r | The horizontal radius entities will be hit in around the projectile. | 1.25 |
VerticalRadius | vRadius, vR | The vertical radius entities will be hit in around the projectile. | Horizontal Radius |
MaxDuration | md | The max duration (in ticks) the projectile will persist. | 100 |
MaxRange | mr | The maximum range (in blocks) the projectile will travel. | 40 |
Velocity | v | The velocity of the projectile | 5 |
StartYOffset | syo | Start Y Offset - Lets you offset where on the casting mob the projectile shoots from. | +1 |
StartFOffset | sfo | Start Forward Offset - How far in front of the mob the projectile starts | +1 |
TargetYOffset | tyo | Target Y Offset - Lets you offset where on the target the projectile shoots at. | +1 |
HitPlayers | hp | true | |
HitNonPlayers | hnp | false | |
HitTarget | ht | true | |
HitTargetOnly | false | ||
StopAtEntity | sE | Whether the projectile will stop upon hitting a targetable entity. | true |
StopAtBlock | sB | Whether the projectile will stop upon hitting an opaque block. | true |
HugSurface | hs | Whether or not the projectile should move along the ground. | false |
PowerAffectsRange | par | Whether a mob's power level affects the projectile's range. | true |
PowerAffectsVelocity | pav | Whether a mob's power level affects the projectile's velocity. | true |
fromOrigin | fo | Whether the missile should start from its origin | false |
"fromOrigin" was added in version 2.3
Examples
This example shoots a missile that looks like a thin trail of flames with a high turning rate. It bursts into a powerful explosion upon hitting its target.
# Mob File
Mob:
Type: ZOMBIE
Skills:
- skill{s=Homer} @target ~onTimer:100
# Skills File
Homer:
Skills:
- missile{ot=Homer_TICK;oh=Homer_HIT;v=4;i=1;hR=1;vR=1;in=0.75}
Homer_TICK:
Skills:
- effect:particles{p=flame;a=1} @origin
Homer_HIT:
Skills:
- effect:particles{p=lava;a=50;hS=1;vS=1}
- effect:sound{s=entity.generic.explode;v=1;p=0}
- damage{a=1337;i=false}