Make the enemy wait at the ledge until the moving platform arrives
A platform glides back and forth over a gap. Enemies either jump too early and drop, or stand there forever. Here is how to compute the exact moment when boarding works, including the case when it is already close enough right now.
Why this works
A platform that swings back and forth on a steady rhythm is fully predictable, so the enemy never has to watch and guess. It only needs the next moment when the platform is close enough, and that moment repeats every round.
When not to use it
Skip it when the platform speeds up, stops or reacts to the player, such as one that only moves when someone stands on it. The rhythm is gone, so the enemy has to watch the platform and decide on the spot.
In the full entry
- What to build, step by step
- Starting values and the reason for each
- 3 common mistakes and the fix
- A diagram of every state
- 20 lines of example code with 3 checks that pass
- How your AI shows you that it works
Say this to your AI
Use the Spielerando entry "Make the enemy wait at the ledge until the moving platform arrives" (read_entry board-a-moving-platform-on-time) in my game. Build it step by step, and show me how you checked that it works.Or skip this and connect the MCP: your AI then finds all of this by itself.Connect the MCP