— Just made you small example of what you can do with it. The rest is up to your imagination.
You can change the sine movement and what it affects in the events.
[updte] - I modified the version so that the enemy stops on hitting the ground to address your other question on solid objects.