Game Maker
Register
Advertisement

action_create_object(obj,x,y)is the action which creates a certain object in a specified position. for example: Say I have an object called "ball" and I wanted to create it some time in my game I might use the create action in another existing object and put ball as the object I want to create in the action menu, and then below I would put the co-ordinates for that object. Below that you can check a box for "relative" wich means if the co-ordinates given are related to the selected object.

//create a object at position
action_create_object(obj_object,32,48)//obj_object = the object. 32 = x. 48 = y

Also you can use:

instance_create(x,y,obj)

It does the same thing.

Example: instance_create(temp_x, temp_y, obj_shot);

See Also[]

Advertisement