# GDScript: Variations

Source: https://tweens.gd/gdscript/variations/

Derive a stronger, slower, or later version of one definition. Factors multiply its values and deltas add to them, when playback starts.

Examples use the global `Tweens` class in a node script, with targets inside the scene tree.

## Scale a motion

```gdscript
var recoil := Tweens.position_2d_x()
recoil.by_value = -12.0
recoil.duration = 0.2
recoil.ease = InOut.QUAD
recoil.ping_pong = true

Tweens.play(sprite1, recoil.with_factor_by(2.0))       # 24 pixels back
Tweens.play(sprite2, recoil.with_factor_duration(1.5)) # 0.3 seconds each way
Tweens.play(sprite3, recoil.with_delta_delay(0.1))     # 0.1 seconds later
```

Each copy follows the original: tune `recoil`, and every variation changes with it. `with_duration()` on a copy instead replaces the duration outright.

## Vary the current value

Leave the destination out, and `factor_to` scales the value captured at the start:

```gdscript
var beat := Tweens.scale_2d()
beat.factor_to = 1.2
beat.duration = 0.15
beat.ease = InOut.SMOOTHER_STEP
beat.ping_pong = true

Tweens.play(sprite, beat)
```

The sprite grows to 120% of its current scale and back.

## Change the pacing

`skew` shifts the outward leg’s balance between its In and Out halves; `weks` does the same for the return. Both run from 0 (fast start) to 1 (fast finish), and 0.5 keeps the ease as written. Set `weks` to `1.0 - skew` to retrace the outward curve.

**Try it:** change the shared recoil kick, and Hit and Crit follow it. Then move `skew`: the pacing changes, the distance doesn’t.

Interactive preview: https://tweens.gd/gdscript/variations/

Paired eases only

`skew` and `weks` apply to paired In/Out eases. Single legs, custom functions, and Godot Curves keep their shape.

[Endpoint reference](https://tweens.gd/gdscript/api/endpoints/)Every factor and delta, and how they combine.
