Instance_create - hpgDesigns/hpgdesigns-dev.io GitHub Wiki
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