A Flash Developer Resource Site

Results 1 to 8 of 8

Thread: Help me please

  1. #1
    Junior Member
    Join Date
    Jun 2002
    Posts
    21
    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...

  2. #2
    :::::::::::::::
    Join Date
    Dec 2000
    Posts
    253
    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?

  3. #3
    Junior Member
    Join Date
    Jun 2002
    Posts
    21

    Smile thanks

    Thats that helps,

    but about reloading and how to make a little pitcure of how many bullets are left....


  4. #4
    Gross Pecululatarian Ed Mack's Avatar
    Join Date
    Dec 2001
    Location
    UK
    Posts
    2,954
    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.

  5. #5
    Junior Member
    Join Date
    Jun 2002
    Posts
    21
    trust me on this... i can draw

  6. #6
    Gross Pecululatarian Ed Mack's Avatar
    Join Date
    Dec 2001
    Location
    UK
    Posts
    2,954
    I was just joking, you did ask "how to make a little pitcure of how many bullets are left..."

  7. #7
    Junior Member
    Join Date
    Jun 2002
    Posts
    21
    What i ment was how wold i make the movie clip so when you click it would rip a bullet off

  8. #8
    Junior Member
    Join Date
    Jun 2002
    Posts
    21
    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
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center