11

First !rant. I'm working on a 2d game using Game Maker at school and I just wounder if putting constants up this way makes you cringe. Is there a better way? This code is only run when switching to a weapon and he values can be put into the shooting script itself. I just want to know how you put in mass constants in general coding or even at all.

Comments
  • 1
    Looks good in my opinion
  • 1
    Looks OK for me too. I often saw a "constants" file dedicated for this kind of constants declarations.

    Above is right, at least add units on comments. And convention is generally to name constants in caps with underscore, like that : FIRE_RATE = 100
  • 0
    Templet. O___0
  • 0
    @willol Ty, ty. 👌
  • 0
    Ironicly I accidentaly deleted the templet after I took the photo. Good thing is that I have a photo.
  • 0
Add Comment