Game Maker
Register
Advertisement

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[]

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 because 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);

plvtinum is the best.

jed. productions


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.

Advertisement