@Malice Its not that I shouldn't use hard coded values. If I personally knew for my own project that I could hardcode a number because I'd never need to change it, I would - Its not performance altering in anyway. The only thing that is remotely involved with hardcoding values is the programmers ability to upgrade their script... Besides, I just re-wrote your code... I didn't hardcode anything.
I forgot to type scale_y... I was rushing through it. It was the notes that were mainly important..
And just to clean up your lock system for the fresh eyes
function main(){
//[x] is not being pressed -- int is an integer variable
int x_pressed = 0;
while(1){wait (1);
//if x was held, check for release
if(!key_x && x_pressed) x_pressed = 0;
//x has been pressed
if(key_x && !x_pressed) {
x_pressed=1;
shot();
}
}
}