Skip to content

Effect Stack

Every GFFPlayer owns a GFFEffectStack that manages running effects.

Formerly named GFFFeedbackStack — same role, updated type name.

Overlap Strategies

When you play an effect with the same label, the stack decides what to do based on overlap_strategy:

Strategy Behavior
IGNORE Ignore the new effect if one is already playing.
CANCEL Stop the old effect and start the new one.
REPLACE Same as CANCEL.
QUEUE Queue the new effect; play it after the old one finishes.
ADD Allow multiple instances with the same label to run simultaneously.

Signals

The stack emits:

  • effect_started(effect_id: String)
  • effect_finished(effect_id: String)
  • all_finished

Stopping

$GFFPlayer.stop()               # stop all effects on this player
$GFFPlayer.stop_effect("shake") # stop one
GameFeelFlow.stop(target)       # same as stop_all for that target
GameFeelFlow.stop_all(target)   # stop everything targeting a node (and descendants)

When replaying from a demo UI, call stop / stop_all and restore the node's transform before play again — otherwise mid-shake offsets become the next effect's "initial" state.