Gamemaker Studio 2 Gml -

: Functions used specifically to build these structs, allowing for a form of Object-Oriented Programming (OOP) within GML.

function Enemy(_name, _hp) constructor name = _name; hp = _hp; static take_damage = function(amount) this.hp -= amount; if (this.hp <= 0) show_debug_message(this.name + " dies!"); gamemaker studio 2 gml