You should see all the variations in my 2D game. Take the behavior of the left shift key. When in the air, the flash attack is used and it can only be used once until certain conditions are met (after using the bounce stomp or fall-glide-hop or simply landing). When on the ground and held, the speed blast charges up. The enter key has several functions as well. It selects items in the menus, it advances through text in the interactive tutorial, and confirms input entries (from inkey - a built-in feature). Because you can jump 6 times (5 in mid-air, resetting under certain circumstances), there are various other conditions and things.

A similar thing can be done. The three important fundamentals to scripting in your case would be using and understanding if statements, and using and understanding function calls. A third is variable manipulation.


"You level up the fastest and easiest if you do things at your own level and no higher or lower" - useful tip My 2D game - release on Jun 13th; My tutorials