Well, you can use a variable to create a pause in between the shots fired. So you'll need to declare a variable, in this case I'll call it bullet_timer. If you don't know how to declare a variable, the easiest way is to go to global code and add this script.
Global Code
- Code: Select all
int bullet_timer;
int is the variable type (meaning it only stores integer values) and bullet_timer is the name of the variable. Anyway, if you have space as your shooting event, you can do something like this.
player -> Key Down Space (repeat enabled) -> Script Editor
- Code: Select all
bullet_timer++;
if(bullet_timer>=2)
{
// replace this line with your CreateActor bullet function call
bullet_timer=0;
}
This will make the player fire a bullet every other frame. You can increase the 2 to decrease the frequency of bullet fire.