Double Jump!

How would i go about creating the platforming classic double jump in game engine? when i hit space once, i would like to have the object only go so high then when i hit it a second time, only go so much higher…any ideas?