- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 19
instance_create
        drewmccluskey edited this page Jan 29, 2019 
        ·
        2 revisions
      
    Creates object in room
instance_create(position, obj, layer)| Argument | Description | 
|---|---|
| Vector2position | Position wher will be object created | 
| Typeobj | Object to be created | 
| stringlayer | Name of object layer where it should be created | 
Returns: GameObject
This function will create a game instance on a specified layer and at a specified position.
if (mouse_check_button_pressed(MouseButtons.Left))
{
    instance_create(new Vector2(200,15), typeof(oPlayer), "Object layer 1");
}This will create instance oPlayer (must be located in the resources folder) on layer "Object layer 1" in the specified position (200, 15).
Back to Instances