Category: Objects
/ Creation
Since engine version: 5.1 OC
CreateObject
Description
Creates an object of the specified type at the specified position. The position will be the bottom center of the new object. xoffset and yoffset are relative to the calling object in local calls, otherwiese global.
Syntax
object CreateObject(id id, int xoffset, int yoffset, int owner);
Parameters
- id:
- Type of object to be created.
- xoffset:
- X coordinate
- yoffset:
- Y coordinate
- owner:
- [opt] Owner of the new object. Either a valid player number or
NO_OWNERfor no owner. If not specified the owner is the controller (see GetController) of the calling object orNO_OWNERif the call is made without object context.
Example
CreateObject(Wipf, 100,100, NO_OWNER);
Creates a wipf at coordinates 100/100 with no owner.


