Skip to main content
1 of 3
Malachi
  • 29.1k
  • 11
  • 87
  • 188

I stopped reading through the code when I got to this:

if (descendAttack || rightMouseActionHappening){ if (!rightMouseActionHappening){ rightMouseActionHappening = true; } //200 is pretty badass } 

First, that comment means nothing to the code, get rid of it.

Second thing is that the inside operation will never get called when rightMouseActionHappening is true, I am not sure how this is supposed to work, if you try something like

if (true) { if (false){ console.log("true"); } } 

you won't get an answer from it, so what I mean is that you should write this a little more like this

if (descendAttack && !rightMouseActionHappening){ rightMouseActionHappening = true; } 

because the inner if isn't going to be called if rightMouseActionHappening is true, so don't test for that.


all of your code could use another indentation inside of the functions, so that I know that it is inside of a function.

Malachi
  • 29.1k
  • 11
  • 87
  • 188