laypax, I'll probably just end up using the default double jump behavior if I can't get this working. Im trying to do it with functions, basically because I think functions are like 'best practice'. I bought a game kit from the scirra store which Im using to try and learn, and all the player's movement mechanics are built out using functions to control everything: moving left and right, jumping, controlling the player shooting etc. So I am trying to build in some additional player mechanics myself, using the same system that the author has in place.
I found some double jump tutorials, for example the one 99Instances2Go mentioned above: Platformer Enhancements - Double Jump, and tried to build that methodology into a function... It kind of works, but not quite.
99Instances2Go, well, I dont think adding custom jumping mechanics to the 'Z' key should clash with the platform behavior should it? The arrow keys still work, and the 'Z' key works for a normal jump, and it even works for a double jump, I just have something screwed up with how the instance variable works...
Ill keep playing with it. Thanks for the replies guys.