BazInputCondition
Analog-aware input condition for GameObjects. Reads joypad sticks, triggers, and deadzones, plus input buffering that carries across states so jump-buffering just works. Three modes, one file, no autoload, no plugin, no Project Settings changes.
To help support my work, consider becoming a patron. ![]()
DOWNLOAD:
v1.2:
BazInputCondition.gd (32.1 KB)
This update will break any previous BazInputCondition resources. It is a necessary design change due to the nature of AGM input. If you find the previous versions not playing well during a local multiplayer setup, you need this version.
- Two modes now, Single and Movement. Dropped Stick / Vector. Each direction reads its own key, so stick, keyboard and D pad all behave the same. Smaller file, cleaner inspector.
- Custom Keys in Movement. The new Source field (MoveAndJumpSetting Keys / Custom Keys) lets you pick your own four keys. Leave one empty to skip that direction.
- Deadzone Enabled toggle. Off by default so buttons and keys stay 0/1. Turn it on when a stick or trigger drives the input and the Deadzone slider becomes the threshold.
- All four timings in both modes. Pressed, Just Pressed, Released, Just Released everywhere, so “all four released” for standing still works now. The stick used to be held only.
- Any Key / All Keys. Combine the ticked directions with Triggered When. Any Key fires on any of them, All Keys needs them held together, like Up + Right for a diagonal. Replaces the old 8 way deadzone.
v1.1:
BazInputCondition.gd (37.1 KB)
- Analog stick now detected in Movement & Stick modes. These modes read each object’s actual per-player input set at runtime, so the left stick registers even when your movement keys aren’t bound directly to the stick axis. (Previously the stick could read as nothing in Movement / Stick.)
- Multiplayer-aware. Single, Movement, and Stick all resolve to the controlling player’s own input (from the object’s
player_id), so each player responds only to their own controller — automatic, no setup. Works for players 1–4. - Movement now uses a round (radial) deadzone. A diagonal push counts the same as a straight one: set Deadzone to 0.9 and a full diagonal still triggers. Directions are picked with 8-way bands (a diagonal lights both neighbours). Keyboard and D-pad behave exactly as before.
- The “Released / at rest” check no longer mistakes a full diagonal for “released.”
v1.0:
BazInputCondition.gd (29.6 KB)
Requirements
AGMaker 1.3.0+
Installation
- Download
BazInputCondition.gd(attached below). - Place it in your project’s
custom_conditions/folder. If that folder doesn’t exist, create it at the project root. A subfolder likecustom_conditions/input/is fine. - That’s it. It’ll show up in the Add Condition dialog under the Input / 入力 group. Nothing to enable.
What it does
Replaces AGMaker’s built-in Input condition with full analog support.
- Two modes: Single (one key) and Movement (4 Keys) — up to four directional keys from the object’s Move & Jump Settings, or four keys you pick.
- Four timings: Pressed, Just Pressed, Released, and Just Released — in both modes.
- Opt-in Deadzone: turn on Deadzone Enabled when a stick or trigger drives the input, and its slider becomes the threshold. Off, plain buttons read 0/1 and it does nothing.
- Movement options: check any of Upward / Downward / Leftward / Rightward, combined with Any Key (any of them) or All Keys (all held together, e.g. Up + Right). The four keys come from the object’s Move & Jump Settings, or from your own Custom Keys.
- Accept Frame Count: an input-buffer window that works across states, so jump-buffering just works.
- Multiplayer-aware: each object reads only its controlling player’s input (players 1–4), automatically.
How to use
Add the condition to a transition, then set Input Mode. The fields update to match:
- Single → Input Key (A, B, arrow_up, …) → Deadzone Enabled (→ Deadzone) → Input Method
- Movement (4 Keys) → Source (MoveAndJumpSetting Keys / Custom Keys) → the four directions (toggles, or key pickers under Custom Keys) → Triggered When (Any Key / All Keys) → Deadzone Enabled (→ Deadzone) → Input Method
What each field does:
- Input Method is the timing: Pressed (held), Just Pressed (the frame it goes down), Released, or Just Released.
- Deadzone Enabled / Deadzone — switch on for analog; the slider is how far a stick or trigger must be pushed to count (0 to 1). Off, a normal button reads 0/1 and ignores it.
- Triggered When — Any Key (matches if any chosen direction fits) or All Keys (only when every chosen direction fits at once).
- Accept Frame Count (shown for the Just timings) remembers the press for N frames, so a transition can accept it slightly late — like pressing jump just before you land. It works across state changes.
Tips
- Deadzone is opt-in and analog-only. It does nothing unless Deadzone Enabled is on, and buttons read 0/1 regardless.
- “Not moving” is easy now: Movement (4 Keys), all four ticked, Triggered When → Any Key, Input Method → Released → true whenever the object isn’t moving.
- For analog Released checks, keep Deadzone modest. A “released” check is true while the stick is below the deadzone, so a high deadzone reports “released” while you’re still pushing. When you pair Pressed (start) with Released (stop), set the Released condition’s Deadzone smaller than the Pressed one — the gap between the two thresholds buffers against the input flickering on/off when the stick rests near the line.
- Movement directions follow each object’s Move & Jump Settings (or your Custom Keys). Objects without one fall back to the arrow keys.
- Diagonals: Triggered When → All Keys with, e.g., Upward + Rightward.



