Thread: Advice
View Single Post
drellem's Avatar
Status: Offline
Posts: 35
Join Date: Jun 2012
Default 07-14-2012, 06:25 PM

When you are programming a game one of the most important things to do is to make sure that different game states are handled well. If you are writing an fps, then you will probably have an event something like "when mouse is clicked on anything do world.shoot"

However, you don't want players to shoot while on the main menu, so world.shoot should look something like this:

if(world.gamestate == "play"){
//code here
Reply With Quote