Skip to content

GFFPlayer

GFFPlayer is the node you add to your scene to organize and play effects and combos.

Key Properties

  • combo_dictionary: Dictionary[String, GFFCombo] — local combos stored on this player.
  • active_combo_key: String — the combo currently selected in the editor.
  • combo_presets: Array[GFFCombo] — optional project-level presets loaded from .tres files.
  • default_params: GFFParams — default parameters applied to all effects played by this player.
  • auto_play: bool — play the default combo automatically on _ready().
  • default_combo_index: int — index of the combo to play when auto_play is enabled. Defaults to the first combo (0). Set to -1 to disable auto-play even when auto_play is on.

Default Combo

Playback

# Play a combo by key
$GFFPlayer.play("hit_light")

# Play a built-in effect by name
$GFFPlayer.play("shake", 1.0)

# Play all effects in the effects array
$GFFPlayer.play_all()

# Stop everything
$GFFPlayer.stop()

How It Finds the Target

When you call play(...), GFFPlayer resolves the target node automatically:

  1. Looks for a Node2D, Node3D or Control child.
  2. If none, uses the parent node.
  3. Falls back to itself.

Editor Helpers

The Inspector and Timeline Editor use these methods to mutate combo_dictionary:

  • editor_add_combo(key_hint)
  • editor_rename_combo(old_key, new_key)
  • editor_delete_combo(key)
  • editor_add_effect_to_combo(key, effect)
  • editor_remove_effect_from_combo(key, entry_index)
  • editor_set_entry_enabled(key, entry_index, enabled)