Skip to content

Instance_create

hugh greene edited this page Jun 20, 2022 · 1 revision

Notation

Description

Creates an instance of the given object at the specified location, returning its ID.

Parameters

  • x: (x, y) coordinate at which the object will be placed
  • y:
  • obj: index of the object to be instantiated

Return Values

Returns the index of the instance that was just created, allowing you to manipulate or track it.

Example Call

int part = instance_create(x,y,obj_particle); // Create a new instance of obj_particle at our position (x,y), storing its id in `part'
a.direction = random(360), a.speed = 5 + random(7); // Set the new particle's velocity randomly.

Demonstrates creating an object. NOTOC

Clone this wiki locally