I do believe someone made a capx of such a movement. There's also a behavior someone made. If you opt to use events the way to do it is with detector sprites. Basically you place one at the left-bottom of the player and one at right-bottom. Then using a loop move them down till they hit the ground. The angle between the two detectors would be the angle of the ground.
After that you'd do the motion. It's simple enough even without behaviors, but I don't have time to explain it.
There's also a website you could probably Google that explains the actual sonic the hedgehog physics in detail. Could be useful.