If you've ever wired up a dash and a dive in GDevelop and watched them fuse into one unmovable blob, you've hit the linked-event problem. It's one of the most common 2D platformer bugs in the engine, and the fix is simpler than you think.
This isn't a beginner mistake. It's a GDevelop-specific gotcha that comes from how the engine processes event chains. Let's break it apart.
What's Actually Happening
When you nest a dive action inside the same event condition as your dash, GDevelop reads them as one continuous logic chain. Press the key, both fire — or worse, the dive state locks onto the dash state and neither resolves cleanly.
The player gets stuck mid-animation. Inputs stop registering. The character just... hangs there.
The root cause: GDevelop evaluates nested actions within the same frame tick. If two movement states share a condition block, the engine can't distinguish which state transition you actually want.
The fix: Separation of concerns. Pull the dive into its own event block.
The Setup
1. Prepare Your Sprite
Two things need to exist before you touch the event sheet:
A "Dash" animation and a "Dive" animation on your player sprite, named exactly as you'll reference them in conditions
The Dive Dash behavior installed on the player object (Behaviors tab → Add a Behavior → search "Dive")
Leave the behavior's default speed and distance values alone until the logic works. Tuning comes after the architecture is solid.
2. Restructure the Event Sheet
Here's the key structural change.
Condition: X key is pressed
→ Action: Simulate Dash
→ Action: Simulate Dive ← nested, causes the lock
After (working):
Event 1
Condition: X key is pressed
Action: Simulate Dash
Event 2
Condition: X key is pressed
Action: Simulate Dive Key
Same input key. Separate event blocks. GDevelop now processes each state transition independently.
3. Add Animation-State Guardrails
Without guardrails, the player can spam dash/dive infinitely — the "Mary Poppins" problem. They'll fly across your level and bypass everything you designed.
The fix is checking animation state before allowing a new action:
Event: Dive
Condition 1: X key is pressed
Condition 2: Animation name ≠ "Dash"
Condition 3: Animation name ≠ "Dive"
Action: Simulate Dive Key
This creates a natural cooldown tied to animation length. The player must finish their current movement before initiating another. No timers needed — the animation duration is the cooldown.
What This Unlocks
Once dash and dive are independent states with clean transitions, you can layer real mechanics on top:
Destructible environments — check if the player is in "Dive" state on collision with a breakable block → destroy it
Stomp attacks — dive state + collision with enemy top hitbox → trigger damage
Precision platforming — gaps sized for a dash-to-dive combo that rewards players who nail the timing
These aren't theoretical. They're standard patterns in games from Super Mario to Wario Land, and they all depend on your movement states being cleanly separated.
Three Rules to Keep
If two actions get stuck together, they're nested in the same event. Pull them apart. Always.
Animations are state indicators, not just visuals. Use animation name checks as conditions to gate actions.
Gate infinite movement early. Animation-based guardrails are cheaper and more intuitive than timer-based cooldowns.
Bottom Line
This is a 10-minute event sheet restructure that takes your character from "broken prototype" to "responsive platformer." Separate the logic, install the guardrails, ship it. Then come back and tune the speeds, friction, and frame counts until your character has weight.
Clean logic first. Polish second. That's the order.
Building a platformer in GDevelop? I publish weekly breakdowns of mechanics, event sheet patterns, and no-code game dev workflow at Katana Works.
Top comments (0)