|
-
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
Code:
onClipEvent (keyDown) {
if (currentBullets>0) {
//fire
currentBullets--;
} else {
//do nothin
}
if (key.getCode("reload button of your choice")) {
currentBullets = maxBullets;
}
}
is that what your looking for?
-
thanks
Thats that helps,
but about reloading and how to make a little pitcure of how many bullets are left....
-
Gross Pecululatarian
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
-
Gross Pecululatarian
I was just joking, you did ask "how to make a little pitcure of how many bullets are left..."
-
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?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|