Here is a basic bare bones example of how to implement and keep track of a "vertical position" value as data only (my numbers are represented by m/s for a natural feel, but you can use whatever unit you want to fit into your system).
https://www.dropbox.com/s/ib8cmxhk1zk30 ... .capx?dl=0
The hard part is the collision filtering (custom solids behavior) system that can interact based on an objects "vertical position". This I can't really help much with, but it looks like you've got something to work with there already.
Edit: Also event 5 is what stops gravity from acting and (when Zheight is 0, or "at rest" on the floor). You may need to add some events to account for "resting" on different levels, such as on top of a box. Your Z height will be greater than 0, but it should not be accelerated by Zspeed and Gravity anymore.