I understand that this debate is fun and all, but what i want to know is what this will be used for and what implications it has for programming, NOT a debate about the viability/importance of imaginary numbers. These forums are intended to be used for GM discussions, not math debates.
Also, I know that there is a way to do this, but I don't remember.
Is there a way thaqt I can make the gun only shoot about every 5 steps? I know it is something like:
[Global left mouse] //in obj_gun [If (whatever variable) is larger than 0 Create moving instance of obj_bullet Set (whatever variable) to 0 Set Alarm (x) to 5]
[Alarm (x)] //in obj_gun [Set (whatever variable) to 1]
I tried the variable can_shoot (like in the scrolling shooter tutorial) and got an error message:
ERROR in action number 1 of Mouse Event for Glob Left Button for object obj_gun:
Error in expression:can_shoot position 1: Unknown variable can_shoot
The way I would do tis is create a variable called reload and when you shoot, it checks to see if the variable is true. After you shoot, it changes the variable to false and sets an alarm to an unspecified amount of steps. The alarm changes the variable to true