Constructing three little enemies
In this game we are going to have three unique types of enemies for the player to fight against: the FloatBot, the SpaceMine, and the Strafer. Each of these enemies will move differently and have a distinct attack. However, there are some common elements that they share, such as they will all have collision with bullets and the player, but not with each other.
It is always useful to think about the commonalities of the various objects as there may be ways to simplify and reduce the amount of work needed. In this case, as we are dealing with collision, we can use a parent object.
Making the enemy parent
Parenting object is an incredibly useful ability in GameMaker: Studio. It allows for one object, the parent, to pass its attributes down to other objects called child objects in what is generally known as inheritance . The best way to think of this relationship is that parents are a group and children are individuals. This means we can tell a group to do something...