Hold Down mouse for constant firing

I'm trying to make it so that my cannon shoots bullets every [reload time in seconds] while holding down the mouse button, without a need to re-click the button. I have it right now so that every click shoots a bullet, but you have to release and re-click to shoot another (assuming [reload time] has elapsed). These are my rules for shooting.
When mouse button is down -
When attribute self.loaded is true -
Change attribute self.loaded to false
Spawn Actor (bullet)
When attribute self.loaded is false -
Timer : After (game.Reloadtime) -
Change Attribute self.loaded to true
When mouse button is down -
When attribute self.loaded is true -
Change attribute self.loaded to false
Spawn Actor (bullet)
When attribute self.loaded is false -
Timer : After (game.Reloadtime) -
Change Attribute self.loaded to true
Answers
timer: however many seconds you want
spawn actor