You may just need to do something different altogether for the terrain instead of using what I did. That array contains all the heights of the terrain which are interpolated to give a smooth terrain. All my function does is do random sized hills + a downward slope to keep everything mostly downhill.
Just dealing with arrays can be hard to visualize. Try to make another project that makes a Sprite go right and sometimes goes down to get some ideas.
Don't use the platform behavior, it clashes with the events. If you want it to jump then do "on touch" -> set vy to -100 or something.
Develop games in your browser. Powerful, performant & highly capable.