I have a system where you can shoot little lasers, but I want to be able to make it so that a single player can only have so many lasers fired at a time, like for say...
You can shoot three lasers at a time, so you shoot three lasers. When the lasers do their thing, the player receives the ability to shoot one more laser again.
Currently I'm just subtracting from the player's laser count when they fire one, and give them back a point when the laser obj deletes itself, but this is extremely wonky and not being very consistent. If a player rapidly fires lasers, they can fire more than they should be able to and don't get the right amount back.
...basically I'm looking for a better way to do this.
Mar 6 2011, 7:31 am