Homing projectiles, true landings and frozen riders
This is Apoli 1.105.0 and Origins 1.46.10. Origins has no changes of its own this time, and is built against the new Apoli.
Projectiles that home in
apoli:fire_projectile has a homing field. The projectile looks for a living entity ahead of it and curves toward it, turning at most turn_rate degrees a tick without losing speed:
"homing": {
"delay": 5,
"duration": 60,
"range": 8,
"angle": 70,
"turn_rate": 10
}It never chases the shooter, their teammates, or a pet, minion or clone they own, and the shot's own bientity_condition and owner_bientity_condition filter what it chases as well as what it hits. The target is picked on the server and every client steers the projectile the same way, so the curve stays smooth. The fields are on Projectile Homing.
More for fire_projectile
reflectiveis an object now, likereturn:"reflective": { "max_bounces": 6, "speed": 0.85 }."reflective": truewithmax_bouncesandbounce_speedbeside it still works exactly as before, and both numbers take expressions. See Projectile Reflection.bientity_action_on_expireruns when a projectile reachesmax_distanceand is removed, which is the place for a burst or a fizzle at the end of the range.offset_x,offset_yandoffset_ztake expressions, worked out for every projectile, so"offset_x": "rUni(-4, 4)"scatters a volley.
Projectiles and summons hit as their owner
When apoli:damage runs with a projectile, a minion or a clone as the actor, as in a projectile's bientity_action_on_hit, the damage is now credited to whoever owns it. A kill drops experience and loot that only players get, the victim fights back against the owner, and the death message names them. Before, the projectile or summon took the credit, so mobs killed by a thrown power dropped no experience.
landing_condition reads the destination
landing_condition on apoli:teleport, apoli:random_teleport and apoli:teleport_to is meant to be tested as though the entity were already at the destination. For apoli:fluid_height, apoli:submerged_in and apoli:on_block it wasn't, since those read what the game had worked out for the spot the entity was leaving. A blink with "don't land in water or lava" was refused while you stood in water and let through into a lake. All three now read the destination.
A freeze holds through riding
A frozen player could get into a boat and ride away unfrozen, because a passenger took its vehicle's tick rate instead of its own. Now:
- An entity's own rate or freeze always applies to it, riding or not. A frozen passenger is carried along but doesn't tick, so it can't steer or climb out.
- A passenger with no rate of its own takes its vehicle's.
- A vehicle never runs faster than whoever is steering it, so a frozen rider freezes the boat, horse or strider under them until they're off it.
- A frozen vehicle stops on its rider's screen too.
The rules are on apoli:modify_tick_rate and /tick.
Custom models that animate themselves
apoli:custom_model_render has two new geometry fields:
bind_body_parts: falsedraws the model exactly as its own animations pose it. Bones namedheadorright_armstay inside their groups and no longer pick up the player's limb swing, so a creature with its own walk cycle stops walking like a player. Withshow_first_person, its arm bones are drawn where the vanilla first person arm is. See Rigs that animate themselves.offsetmoves the whole model, in blocks, along the holder's own left, up and forward axes.
Minions and projectiles now always draw their models this way, keeping bones named after body parts inside their groups. A minion or projectile model with a head or body bone nested in a rotated group now shows that rotation, where before the bone was lifted out and lost it.
Smaller changes
apoli:delayticks, andapoli:loopvalueandticks, take expressions, worked out when the action starts.apoli:movingworks on other players on the client. It always readfalsethere, so a walk animation keyed on it never played on anyone but yourself.
Documentation fixes
- The model example on
apoli:fire_projectileusedmodelandtexture, whichcustom_model_renderdoesn't have. It usesmodel_locationandtexture_locationnow, and a model ID instead of a file path. entity_idon thefire_projectileaction is another name forentity_type, and not a separate tracking ID.hide_capeworks in bothcustom_model_rendermodes, not only in texture mode.- The tick rate pages said a frozen player could still walk. They can't, because their own client stops ticking them too.