Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / Subtracting Ammo When Key Is Hit

Author
Message
Lysander610
7
Years of Service
User Offline
Joined: 5th Mar 2012
Location:
Posted: 13th Mar 2012 18:25
I am Trying To Limit The Amount of Ammo that can be fired

my code is here


if (dbControlKey()) {
if (ammo > 0){
dbSprite(PROJ_2,0,0,PROJ_2);
dbRotateSprite(PROJ_2,90);
ammo--;
}


}
dbMoveSprite(PROJ_2,10);

Right Now It Keeps Subtracting Ammo Until I Let Go Of The Control Key


Any Help Would Be Appreciated
Hassan
10
Years of Service
User Offline
Joined: 4th May 2009
Location: <script> alert(1); </script>
Posted: 13th Mar 2012 20:17
something like this maybe?


Mr Bigglesworth
11
Years of Service
User Offline
Joined: 4th Mar 2008
Location:
Posted: 14th Mar 2012 04:24
Try using if(dbControlKey() && ammo > 0)

Login to post a reply

Server time is: 2020-02-26 07:56:50
Your offset time is: 2020-02-26 07:56:50