I K Target
Description
Make an inverse kinematics chain reach for the target entity, a bone of the target entity's model, or a location. The model must be on the caster.
The chain blends to the target over the chain's blendticks (see IK). An entity target is
followed until it is removed or the target is cleared. On a jig chain this ties the end of the rope to the target: the
rope sags in between, and when the target is farther away than the rope is long, the rope goes straight and stops short.
The target is saved with the model. An entity target is only restored if the entity is loaded when the model loads.
Attributes
| Attribute | Aliases | Description | Type | Default |
|---|---|---|---|---|
| modelid | m, mid, model | Targeted model | String | |
| partid | p, pid, part | The bone that controls the chain: the null object of a Blockbench IK chain, the tip bone of an IKChain, or the last link of a jig chain.If not set, targets every IK bone |
String | |
| targetpartid | tp, tpid, targetpart | A bone of the target entity's model to reach for instead of the entity's position. It is followed every tick, also while it animates. While the target has no such bone, the chain lets go | String | |
| targetmodelid | tm, tmid, targetmodel | The model of the target that has targetpartid.If not set, uses the first of the target's models that has the bone |
String | |
| yoffset | y, yo | Vertical offset added to the target position | Float | 0 |
| follow | f | Keep following a moving entity target. With false the chain reaches for the spot the entity, or its targetpartid bone, is at |
Boolean | true |
| clear | c | Remove the target, so the chain blends back to its animation | Boolean | false |
| exactmatch | em, exact, match | Should the part match the partid completely |
Boolean | true |
Examples
Reach for whoever hits the mob, and let go every 5 seconds:
Skills:
- iktarget{p=arm_target;y=1.2} @trigger ~onDamaged
- iktarget{p=arm_target;clear=true} @self ~onTimer:100
Tie the end of a rope to the player who right-clicks the mob, and untie it when the mob is hit:
Skills:
- iktarget{p=rope_end;y=1.2} @trigger ~onInteract
- iktarget{p=rope_end;clear=true} @self ~onDamaged
Tie the end of a rope to the arm bone of the mob's target, so it stays on the arm while that mob animates:
Skills:
- iktarget{p=rope_end;tp=arm} @target