A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: [CS3] Item pickups

  1. #1
    Junior Member
    Join Date
    Sep 2008
    Posts
    4

    [CS3] Item pickups

    Hopefully i can explain this correctly, making a shooter game and want a item pickup basically my avatar will run into the weapon and it'll change to the its different pose (avatar holding that weapon). From what I can understand the avatar to item will be a collision detection but I have no idea where to start. This is my most difficult part for my game >_>

    any suggestions?

  2. #2
    Heli Attack! iopred's Avatar
    Join Date
    Jun 2003
    Location
    Sydney, Australia
    Posts
    923
    I would think the bullets colliding with enemies would be the most difficult part

    But collision detection in general will be needed all over your game (bullets vs enemies, enemies vs player, player vs powerups), look into HitTest.
    Christopher Rhodes
    squarecircleco.

  3. #3
    Junior Member
    Join Date
    Sep 2008
    Posts
    4
    well I have bullets colliding with enemies that wasn't too bad its just figuring out the dang hitTest for a different item

  4. #4
    Member
    Join Date
    Aug 2006
    Posts
    56
    I'm not sure if this is what your looking for, but you could try putting this on your character:

    Code:
    onClipEvent (enterFrame) {
    if (this.hitTest(_root.Weapon)) {
    gotoAndPlay("WeaponFrame");
    }
    }

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