Fandom

Game Maker

Argument

281pages on
this wiki
Add New Page
Talk0 Share

An argument in Game Maker is whatever goes into the brackets after a function's name.
Every function requires a specific amount of arguments, separated by commas and each of them need to be of a specific type. This is a common mistake when starting with GML and always results in errors if you dont fill them in or you leave them at default.

Example Edit

instance_create(x,y,obj); - this function will create an object, inside the brackets are where you put the arguments. In this case there are 3 arguments, we need to fill these in before our code will function properly. Okay so first we need to fill in the first one, it says x so we know there is where we type the x position of where we want to create out instance at, lets say we put 100, now in the y its the same except its the y position so lets say we put 100 again, no in the obj part we know its asking for an object becuase of the name, so here we put the name of the object we want to create, so OBJ_BALL.

Now the final result would be instance_create(100,100,OBJ_BALL);


This article is a stub. You can help the Game Maker Wiki by expanding it.Arguments are a very crucial part of gamemaker. Without them, everyone would die within seconds.

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.