Hi,
You might not understand the question so I try to make it clear. In my game, you have to jump from cube to cube. If you miss the jump, the cube you’re standing on should fall down.
This is how it looks like:
I made a script attachted to each cube to controll the movement as seen in this picture:

The cubes move only in X-axis, the Y-axis is always 0 and the Z=axis is always 1.5 away from the cube before.
What I want, is that the cube you’re standing on, should fall down automatically when you stay on it for too long. I already made it so, that whenever you jump, the cube beneath you will fall down.
The tricky part is that some cubes should fall down really fast if the player jump on it and some cubes should fall down after a longer time. So I can’t just make it so that whenever the player jumps on a cube, it should fall down after x seconds.
I already tried to make a Fall Down Time (time after the game start when the cubes falls down in seconds). I made it like this:
fallDownTime = arrivalAtTime + afterArrivalGoToXInSeconds + 0.6f; //after the cube is arrived at the point where the player should jump, the player has 0.6 seconds until the cube falls down.
This didn’t work, because the cube sometimes has to wait with the player on it before the next cube arrives.
I also tried to make a trigger in front of each cube, that checks if another cube is in front of it. So if there came a cube in the trigger, the cube with the trigger should fall down after around 0.6 seconds for example.
However, this also didn’t work, because sometimes two cubes start on the same X-asis and that would trigger the collider immediately like in the image below.
So in short, each cube should fall down automatically after a short amount of time (the time a player has to react) when the next cube is arrived, where the player should jump to.
Why do I want this? Because otherwise, you will never fail the level if you just stay on a cube without jumping like you can see below.
https://i.gyazo.com/06284f344e6f54c4c4a7119bfb960ed2.mp4
I understand if you are really confused and don’t understand what I mean. Then please ask me.’
Thanks


