You could use the "on_space" function. IE:
function main()
{
...
on_space=player_jump; //call this just once
...
}
function player_jump()
{
player_entity.z += 10; //ME is not valid here
}
or a messier way (but still acceptble) would be
action your_action()
{
var space_pressed = 0; //before WHILE loop starts
...
if(key_space==0)
{
space_pressed = 0;
}
else
{
space_pressed = 1;
if(space_pressed==0) my.z += 10;
}
...
}