Skip to content

Entity reference

The entities of the Gameplay entities pack, grouped by what you would use them for. Each entry says what the entity is for, then lists its inputs (what other entities can tell it to do), its outputs (events you can wire onward) and its keys (the settings in the Inspector). How outputs connect to inputs is explained in Inputs and outputs.

Page What you find there
Logic Invisible helpers that decide when things happen: relays, "only if" checks, gates, flip flops, random picks and cases, counters, timers, a map start event and cutscene timelines
Math and values Invisible helpers that store, calculate and compare numbers, like a score that opens a door
Scripts and calls Run a GDScript snippet, call your game code, play an animation or print what a chain is doing
Doors, movers and buttons Brush entities that move: sliding and swinging doors, lifts, trains and buttons
Triggers Invisible volumes that react when a body walks into them, to start events, hurt, teleport, push or spawn
Spawners and paths Spawning enemies or pickups, teleport destinations, path corners and scripted cutscene characters
Props, lights and effects Breakable physics props, static models, explosions, on screen text, switchable lights, sound, particles and light probes
Streamed sections Landmarks and connector volumes for playing several maps as one world with no loading screen

Installing and customizing

The pack is not part of the addon itself. Press Install Gameplay Entities in the Set up this project window, or choose Gameplay > Install Gameplay Entities, and its definitions and scripts are copied into res://trenchdot/entities. Until then the Entities panel only lists the core: worldspawn, the func_ helpers, light, light_spot, the light and reflection probes and info_player_start.

The copies belong to your project. Change an entity's script in scripts/ or its keys and defaults in definitions/, delete the entities you do not use, or add your own. An addon update offers a newer pack but never overwrites a file you edited. Project setup explains updates and what happens when two definitions share a classname.

Reading the entries

  • Arguments in brackets are what an input accepts or what an output passes along, for example trigger(activator) receives the body or entity that started the chain.
  • Every entity with inputs or outputs has a targetname key, except logic_auto. It is the name other entities use to reach it.
  • A key you do not set uses the default listed.
  • Distances are in map units, 32 per meter. Speeds are in meters per second, and omni_range, spot_range and max_distance are in meters.
  • The input and output lists are what the editor's pickers offer. At runtime any method on the entity's script works as an input, so the picker is not the full list.

To add your own classes, see Custom entities in GDScript.

Not in the pack

The core comes with the addon and needs no pack. Worldspawn holds the sun, ambient light, sky, fog and streaming settings, and the Inspector shows it when nothing is selected. The FuncGodot classes func_geo, func_detail, func_detail_illusionary and func_illusionary build plain geometry. info_player_start marks where the player spawns but spawns nothing itself, your game code puts the player there. light and light_spot are the switchable lights.

Brush entities and model entities collide by default, see Collision for the keys that change it.

The player is not an entity, it is a scene from your own game. The pack expects it in the player group and on collision layer 1, where triggers look, with a take_damage(amount, source) method that hurt triggers and explosions call. A player on another layer needs that layer in Trigger Collision Mask, see Triggers. See godot/demo/player.gd for a complete one.