> For the complete documentation index, see [llms.txt](https://scenegroup.gitbook.io/cavalry/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://scenegroup.gitbook.io/cavalry/nodes/behaviours/simple-value-solver.md).

# Simple Value Solver

{% hint style="danger" %}
Beta Feature. To enable, check **Enable Beta Features** in [Preferences](/cavalry/user-interface/menus/window-menu/preferences.md).
{% endhint %}

**Mode** -&#x20;

* **Accumulate** - add the **Value** each frame.
* **Highest** - if the value on the current frame is higher than this value then we keep it.
* **Lowest** - if the value on the current frame is lower than this value then we keep it.
* **Velocity** -&#x20;

**Value** -&#x20;

**Fade Mode** - determine whether values should remain persistent or fade back to the initial value.

* **Off** - don't fade values.
* **Multiply by Value** - on each frame, multiply values based on the **Fade Value**.

**Fade Value** - the speed at which the value will return to its initial values once the Solver is 'off' (e.g. outside a [Falloff](/cavalry/nodes/utilities/falloff.md)). The lower the value, the quicker the fade.

**Offset** - add/subtract a value to the output.

**Start Frame** -&#x20;

**Time** - a default connection to the [Composition's](/cavalry/nodes/shapes/comp-node.md) time attribute.

![Using a Solver to set the number of sides on a polygon.](/files/-Lnr9MkHUicON5cII7zS)

{% hint style="info" %}
Example usage:&#x20;

1. Create a **Simple Value Solver**.
2. Set its *Offset* to **2** and set *Fade Mode* to **Multiply by Value**.
3. Right click on the **Simple Value Solver's** *Value* attribute in the [Attribute Editor](/cavalry/user-interface/menus/window-menu/attribute-editor.md) and add a [Value Behaviour](/cavalry/nodes/behaviours/value.md).
4. Set the *Value* on the **Value Behaviour** to **0.5**.
5. Add a [Falloff](/cavalry/nodes/utilities/falloff.md) to the **Value Behaviour**.
6. Make a [Polygon](/cavalry/nodes/shapes/basic-shape.md).
7. Connect ***simpleValueSolver.id*** > ***polygon.sides***.
8. Select the **Polygon** and `alt + click` the [Duplicator](/cavalry/nodes/shapes/duplicator.md) [Shelf](/cavalry/user-interface/menus/window-menu/shelf.md) item.

When you drag the **Falloff** around the sides of the shapes under the Falloff will increase and then return to 2. As there's no such thing as a 2 sided polygon the shapes disappear. If you set the *Offset* on the **Simple Value Solver** to **3** then the shapes would be triangles (3 sided polygons) when outside of the Falloff.

In the above example we're also affecting the colour. To do this simply:

1. Create another **Value Behaviour**.
2. Connect ***simpleValueSolver.id*** > ***value.value***
3. Connect ***value.id*** > ***polygon.materialColor.r***
4. Ramp up the **Strength** attribute on the *Value.*

In this example the *Value* is simply being used as a multiplier to set values that have a visible effect on a range of 0-255 (the red channel).
{% endhint %}
