CreateObjectAbove

Category: Objects / Creation
Since engine version: 6.0 OC

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, otherwise global.

Syntax

object CreateObjectAbove(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_OWNER for no owner. If not specified the owner is the controller (see GetController) of the calling object or NO_OWNER if the call is made without object context.

Example

CreateObject(Wipf, 100,100, NO_OWNER);
Creates a wipf at coordinates 100/100 with no owner. If the landscape begins at y-coordinate 100, then the wipf will be stuck.
CreateObjectAbove(Wipf, 150,100, NO_OWNER);
Creates a wipf above coordinates 100/100 with no owner. This time the wipf should be standing on the landscape.
See also: CreateConstruction, CreateContents, CreateObject, RemoveObject
springer, 2002-04
Marky, 2015-01