For the lagging elevator, try disabling event 21 in Yann's example, and you'll hopefully see what it does.
Controlling the elevator with buttons gets a bit more complicated though, I don't think sine movement is the best behaviour to use in that case.