-
Notifications
You must be signed in to change notification settings - Fork 0
Blendstores
Blendstores are a category of blendshape created by VMC-MC. They behave slightly differently from standard blendshapes, but occupy the same format.
Blendshapes are intended to continually output a value, typically read from some sensor. This makes them ideal for continual events or reading the status of something. They struggle, however, to meaningfully output instant events.
The blendstore is a special blendshape that can be used to read instant events.
Just like a regular blendshape, the blendstore is always outputting a value. But the blendstore remembers its previous output and has different components that affect its value.
- Initial value
- The default value to output with no event triggered.
- Activation value
- The blendstore will jump to this value after its event has been triggered.
- Duration
- How long the blendstore will stay at its activation value until returning to the initial value.
- This is measured as the number of times it outputs.
- Decay
- After the duration has been exceeded, the outputted value will move by this amount towards the initial value.
The vmc-mc:attack_living
blendstore follows this lifecycle:
- The blendstore is outputting
0
. - You attack a mob.
- The blendstore is triggered, it begins outputting its activation value of
1
. - The blendstore will output
1
for the next 50 outputs (2.5 seconds, 1 output per Minecraft tick). - The 51st output will be
0.95
, the 52nd output will be0.9
, the 53rd output will be0.85
, and so on. - The output of the blendstore eventually falls back to
0
.
In this way, the blendstore is able to treat instant events as if they were continuous, and then output as a regular blendshape.