Fandom

Game Maker

Action create object

281pages on
this wiki
Add New Page
Talk2 Share

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 Edit

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.