The Begin Step event has nothing to do with this. All you need is to do things in the right order...
As in, create two variables,
previous and
current, but give them more descriptive names than that.
Every step, set
previous to
current.
Then - and it's important to keep the order exactly like this - set
current to the result of a check whether there's solid ground below you.
This means that
current now carries the value that corresponds to the current step, but
previous now carries the value that corresponds to the previous step. That's because you just set it to
current (which was last updated in the previous step, but
not yet in this step) and
only then updated
current so that it now carries the current step's value.
You can now tell which state you're in based on the values of these two, e.g.
false /
false: You weren't on the ground and still aren't - You're in the air
false /
true: You weren't on the ground and now are - You just landed
true /
true: You were on the ground and still are - You're on the ground
true /
false: You were on the ground and now aren't - You just jumped or walked off a cliff