Gamemaker Studio 2 Gml -

function Card(_suit, _value) constructor { suit = _suit; value = _value; static get_name = function() { return string(value) + " of " + suit; } }

// 1D Array inventory = ["sword", "shield", "potion"]; // 2D Array (Grid) map = [ [1, 1, 0], [1, 0, 1], [0, 0, 1] ]; gamemaker studio 2 gml

So, open GameMaker, create a new Object, open the Create Event, and type: function Card(_suit, _value) constructor { suit = _suit;