Inheritance

Inheritance is a concept associated with object-oriented programming and polymorphism. Inheritance is when one object inherits characteristics or abilities from another. Inheritance can be implemented in Game Maker through setting a parent object. The parent object will pass down everything contained in it, with the exception of its sprite to the child object. Then, anything can be overwritten in the child object. For example, if pressing a certain key would do a different thing in the child object than the parent, there would simply be an event for that key in the child object which would automatically override the key event in the parent object. Implementations of inheritance can be as simple as creating a duplicate object with a different sprite to creating a complex structure of walls and enemies.