ObjectPlus

From Skyscraper Wiki
Jump to navigation Jump to search
This article is legitimate.
It contains good-faith information, such as an existing building or content.

ObjectPlus is a script made by EG881 as a part of EG881 Integration Project Build 10. There are several functions available such as drawing, creating different lines, as well as escalators. Most of this was last updated by EG881 on January 16, 2017, and hasn't been updated since then.

NOTE: This list below is still a work in progress and was originally made by EG881, so all credit goes to EG881.

Control Functions

OP_Draw – the specialized ObjectPlus equivalent of DrawWalls, this function sets which components or sides of an object are drawn. Generally, OP_Draw will follow the conventions used for DrawWalls.

Syntax: OP_Draw(1, 2, 3, 4, 5, 6)

Each of these parameters can be either true to enable the side/component or false to disable the side/component. All of these are initially set to true at startup, but if any are set to false it will apply to all subsequent functions in your building script until reset back to true when OP_Draw is called again.

Each function in this guide lists which component or side the OP_Draw parameters will affect. Some functions will not use all six parameters.

Standard Shapes

  • OP_Line – creates a floor using two points each with x, y, z, and width values drawn perpendicular to the line created by the two points. This is essentially an angled AddFloor. Also, the function does not use OP_Draw.

Syntax: OP_Line(destobject, name, texture, aligntexturemap, x1, y1, z1, w1, x2, y2, z2, w2)

destobject specifies the destination object (floor, external, buildings, landscape, or elevator). name is the name of the object. texture is the texture of the object. aligntexturemap currently does nothing. x1, y1, and z1 correspond to the x, y, and z coordinates of the first point. w1 is the width of the floor at the first point. Likewise, x2, y2, z2, and w2 correspond to the x, y, z, and width values at the second point.

The width is always drawn to the right 90° from the direction of drawing. In other words, when travelling down the line from P1 to P2, the width will always draw to your right.

  • from –z to the +z direction, width will draw towards the +x direction
  • from +z to the –z direction, width will draw towards the –x direction
  • from –x to the +x direction, width will draw towards the –z direction
  • from +x to the –x direction, width will draw towards the +z direction


OP_MultiLine – creates a path of connected floors using multiple points. This is useful in making curving 3D objects such as curved railings, roads, or track. Currently, MultiLine is limited to a maximum of 7 points. Like OP_Line, the function also does not use OP_Draw.

Syntax: OP_MultiLine(drawingmethod, destobject, name, texture, tilex, tilez, numberofpoints, x1, y1, z1, w1, x2, y2, z2, w2, x3, y3, z3, w3...)

drawingmethod does nothing. destobject specifies the destination object (floor, external, buildings, landscape, or elevator). name is the name of the object. texture is the texture of the object. tilex and tilez are the texture tiling values. numberofpoints specifies the number of points in the multiline (maximum is 7). xn, yn, and zn correspond to the x, y, and z coordinates of point n. wn is the width or the line at point n.


Similar to Line, the width is always drawn to the right 90° from the direction of drawing. In other words, when travelling down the line from P1 to P2, the width will always draw to your right.

  • from –z to the +z direction, width will draw towards the +x direction
  • from +z to the –z direction, width will draw towards the –x direction
  • from –x to the +x direction, width will draw towards the –z direction
  • from +x to the –x direction, width will draw towards the +z direction

MultiLine uses a set of special non-trigonometric formulas to calculate the points Qn in the Figure 2. These were mathematically derived using similar triangle and vector bisector properties.

OP_Polygon – creates a regular polygon (equal side lengths) with an arbitrary number of sides. Current restrictions include a maximum of 10 sides. The polygons are drawn to be inscribed in a circle (see Figure 3). The function also doesn't use OP_Draw.

Syntax: OP_Polygon(drawingmethod, destobject, name, texture, numberofsides, centerx, centerz, radius, altitude)

drawingmethod was created to allow the polygon to be drawn as if it were circumscribed about a circle, however this function was discontinued for OP_AdvPolygon and was only programmed to do inscribed polygons. destobject specifies the destination object (floor, external, buildings, landscape, or elevator). name is the name of the polygon object. texture is the texture of the object. numberofsides specifies the number of sides the polygon will have (current maximum is 10). centerx and centerz are the respective x, and z coordinates of the center of the polygon. radius specifies the distance from the center to the vertices when inscribed or the distance from the center to the midpoint of each side when circumscribed.

Currently, the polygon will always draw starting at the +x direction from the center (x = centerx + radius, z = centerz). A rotation parameter will be added later to allow rotating the polygon at an arbitrary angle counterclockwise from the +x axis.


Escalators

Todo List

  • Prism function
  • Arc function
  • Add Tree function from SROC as a possible expansion
  • Add Sphere function, with starting and ending angles from the +x and +y axis, detail level

See also