object.set_shape

a.k.a. object.set_boundary

This function allows you to change an object's shape boundary. Shape boundaries can be set in Forge and changed at run-time by a gametype script. Scripts can make boundaries visible to some or all players, and test whether objects or players are inside of the boundaries.

Arguments

type

Any of the following values:

none
The object will have no shape.
sphere
The object will have a shape with one dimension: a radius.
cylinder
The object will have a shape with three dimensions: a radius, top, and bottom.
box
The object will have a shape with four dimensions: a width, length, top, and bottom.
dimensions...

Zero or more dimensions for the shape, as appropriate for the given type. A value of 10 represents one Forge unit. All dimensions are validated by the game engine: negative numbers are forced to zero, and values are capped to a maximum of 2000 (or 200 Forge units).

Example

for each object with label "use_none" do
   current_object.set_shape(none)
end
for each object with label "use_sphere" do
   current_object.set_shape(sphere, 10)
end
for each object with label "use_cylinder" do
   current_object.set_shape(cylinder, 10, 10, 10)
end
for each object with label "use_box" do
   current_object.set_shape(box, 10, 10, 10, 10)
end

Notes

See also