How to GameMaker: Shooting Enemies

Be able to have shooting enemies using GameMaker Studio.

112 Views 4 Likes
How to GameMaker: Shooting Enemies
7 Steps
Supplies
Embed
1
Add a sprite and image for the enemy bullet.

Add a sprite and image for the enemy bullet.

2
Add a Step Event for the Enemy

Add a Step Event for the Enemy

Recommended For You
3
Add a "Test Chance" action.  Depending on how frequent you want your guard to shoot, change the number a sides (1 being the most frequent).

Add a "Test Chance" action. Depending on how frequent you want your guard to shoot, change the number a sides (1 being the most frequent).

4
Add a "start of a block" and "end of a block" action.  In between the arrows, add a "create a moving instance" action.

Add a "start of a block" and "end of a block" action. In between the arrows, add a "create a moving instance" action.

5
Double click on the "create a moving instance" action and apply it to self. Select the enemy bullet as the object. If you want the bullet to come from the shoulder of the guard, select 8 for x and y.

Double click on the "create a moving instance" action and apply it to self. Select the enemy bullet as the object. If you want the bullet to come from the shoulder of the guard, select 8 for x and y.

6
Type in direction for direction and set the bullet relative to the guard (check the relative box).  And there you have it!  Your enemy can now shoot!

Type in direction for direction and set the bullet relative to the guard (check the relative box). And there you have it! Your enemy can now shoot!

7
Make sure your character will lose a life when hit by the bullet and destroy the instance after it hits your character.

Make sure your character will lose a life when hit by the bullet and destroy the instance after it hits your character.

keyboard shortcuts:     previous step     next step
Comments
0 COMMENTS
View More Comments