*cries*

One reason I haven't released my current version yet is because I'm trying to clean up my variables. I discovered today that I use too many variables. There are so many things I need to check in order to prevent certain bugs that I can think of, but then I forget which variable actually does what. Spent all day today (literally) trying to debug my Sword Skeleton, only to just now realize the following:
1) I used "hspd" to specify how fast the enemy moves horizontally
2) I used "dir" to specify what direction the enemy is actually moving (simplified my timelines this way)
3) I used "image_xscale" to change directions on enemies that don't need "dir"
4) I made a series of conditionals to check if a wall or pit is in front of an enemy
5) I based said conditionals on the enemy's hspd
6) ...
If that didn't set off any alarms, I guess I'm not alone. In other words, said conditionals worked as intended only when "dir" wasn't involved. In other words, the "if hspd<0" conditional was never met in the Sword Skeleton, which uses "dir", so all day long I've been trying to debug a script that wasn't bugged at all. It was doing exactly what I had told it to do. ... I just told it to do the wrong thing.
*tries to remember all the other right things he thought were wrong today and put them back how they were this morning*