-
[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?
-
Heli Attack!
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.
-
well I have bullets colliding with enemies that wasn't too bad its just figuring out the dang hitTest for a different item
-
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|