Skip to content

Combos

A GFFCombo is a timeline of GFFComboEntry items. Each entry contains:

  • effect: GFFEffect — the effect to play.
  • start_time: float — when to start, in seconds.
  • duration: float — how long the entry lasts (also overrides the effect duration for that entry).
  • track_idx: int — the timeline track.
  • enabled: bool — whether the entry is active.

Built-in Combos

GFFCombo.hit_light()
GFFCombo.hit_heavy()
GFFCombo.death()
GFFCombo.pickup()
GFFCombo.pickup_coin()
GFFCombo.explosion()

Hit presets layer shake + bleach flash (+ freeze / punch on heavier variants). Amplitude values are tuned for readable 2D pixel motion; punch uses relative scale (BY_AMOUNT).

See the full list in the API reference.

Creating Combos in Code

var combo = GFFCombo.new()
combo.label = "my_combo"

var shake = GFFEffectCommon.new()
shake.target = GFFPositionTarget.new()
shake.tweener = GFFShakeTweener.new()
shake.tweener.amplitude = 10.0

var flash = GFFEffectCommon.new()
flash.target = GFFColorTarget.new()
flash.tweener = GFFFlashTweener.new()
flash.tweener.flash_color = Color.WHITE

combo.add_entry(shake, 0.0, 0.2, 0)
combo.add_entry(flash, 0.0, 0.1, 1)

$GFFPlayer.add_combo(combo, "my_combo")
$GFFPlayer.play("my_combo")

Or via the singleton:

GameFeelFlow.play_combo("hit_light", target)

Execution

When a Combo plays, each track runs independently. Entries on the same track run sequentially by start time; entries on different tracks run in parallel.