Allowing to make double jump

How do I make double jump?. Whenever I put allow to jump again, it just goes “flying”, but I want it to jump just two times.

Hi maybe adding a variable like jump_count at the begin of the scene set jump_count to 0,
add 1 when you first jump
add 1 when you second jump
then check if player is not on floor and jump_count >=2 then he cannot jump again.

Pseudo:
Event;
Condition:
button press Space or some button you like:
Trigger Once
if player is on floor
if jump_count < 1
Do your jump actions here
jump_count += 1

Event:
button press Space or some button you like:
Trigger Once
if player is falling or player is jumping
if jump_count < 2
Do your jump action here
jump_count +=1

Event:
if player is on floor
do jump_count = 0