I'm Coding a Game - Part 4
Another new feature is that coding is checked in real time, and the program will let the coder know if a line is faulty. If a variable is created and not used, the coding screen will have an alert by it.
The last new feature I noticed was the background and layers window. This new feature allows the coder to place objects at different levels so all the objects appear in the correct order. In the past version, it was rather difficult and time consuming to achieve this task, but in CMS2 layers are arranged in a window:
…and the bullet flash. This isn’t the actual artwork. The actual one is just a white circle with a transparent background. When I posted the original, I couldn’t understand why I couldn’t see it. I spent 10 minutes cussing about how stupid the computer was until I realized I was trying to upload a solid piece of white onto a complete white background. Not one of my better moments.
As you can see, I assigned the x and y coordinates of the gun to the oPlayer who is the main character. So now wherever the player moves the character the gun will follow and stay in the same place. Next, I wrote the line that makes the gun follow the movement of the mouse.