By any chance would anyone here know how to make virtual cop style games? I need help with making it have limited ammo and it be reloadable...
Printable View
By any chance would anyone here know how to make virtual cop style games? I need help with making it have limited ammo and it be reloadable...
i do . lots of buttons and lots of variables , hehe ...
you'll need a currentBullets var and a maxBullets var
is that what your looking for?Code:onClipEvent (keyDown) {
if (currentBullets>0) {
//fire
currentBullets--;
} else {
//do nothin
}
if (key.getCode("reload button of your choice")) {
currentBullets = maxBullets;
}
}
Thats that helps,
but about reloading and how to make a little pitcure of how many bullets are left....
Well, each time you shoot, do
_root.bullets--;
And for reloading do
_root.bullets = 5;
For drawing the picture, I would advise you to go for a normal magazine, filled with 5 simple, short bullets. But, make sure you can see them in a slot down the middle. To draw it, the mouse can be quite handy.
trust me on this... i can draw
I was just joking, you did ask "how to make a little pitcure of how many bullets are left..." :D
What i ment was how wold i make the movie clip so when you click it would rip a bullet off
i Know this is getting a little anoying but would it be posible for you just to make a tutorial out of this so we dont have to duke it out on the forum?