If the bullets are going very fast like real guns now-a-days then you wont be able to see them, in which case use intersect object. Here's the walktrhough:
- Create a limb infront of the character, position it at the maximum distance you want the bullets to be shot.
- If the mouse is clicked, then:
- Use a for/next loop to check if anything is intersecting between the user and the limb using the intersect object command.
- If something is intersecting (>0)
- If the object is a player object (or whatever object that can be killed [eg:, if you had 10 enemies and their object numbers were from 20 to 30, then you could check if the object intersecting's number is between 20 to 30])
- Lower the object's health variable by 1....or delete the object....or whatever you want to happen when the bullet collides.
Moving slow bullets is a little more complex but you would probably want to use a timer of some sort.
Current Projects: SHADE - Game Maker | Mecho - TGC Puzzle Entry | Halo Physics Engine | COLD - Polygonal Collision Detection