object.place_at_me

Spawn a new object at this object.

This function returns object.

Arguments

type

A type of object that can exist in the game world.

label

A string literal containing the name of a Forge label, or an integer constant denoting the index of a Forge label in the game variant's label list.

flags

The word none, or one or more of the following flags separated with the | symbol:

never_garbage_collect
Prevents the created object from being garbage-collected.
suppress_effect
Unknown.
absolute_orientation
Unknown.
x

The X-coordinate of a position offset. Allowed values are integer constants between -128 and 127, inclusive, where 10 is equal to one Forge unit.

y

The Y-coordinate of a position offset. Allowed values are integer constants between -128 and 127, inclusive, where 10 is equal to one Forge unit.

z

The Z-coordinate of a position offset. Allowed values are integer constants between -128 and 127, inclusive, where 10 is equal to one Forge unit.

variant-string-id

A variation to apply to the created object, if the object type supports it.

Example

--
-- Spawn a Spartan with Kat's armor:
--
global.object[0] = global.object[1].place_at_me(spartan, none, never_garbage_collect, 0, 0, 0, kat)

Notes

See also