e2 docs egpobjects - wiremod/wire GitHub Wiki
Egpobjects
Egpobject = Egpobject:modify(
Arguments)
Modifies an object with the provided arguments. (10 ops)
Egpobject:setOrder(
Order)
Sets the order at which the object will be rendered. This is different from index (15 ops)
= Egpobject:getOrder()
Returns the order at which the object is rendered (15 ops)
Egpobject:setOrderAbove(Egpobject Abovethis)
Makes the object render above the object (15 ops)
Egpobject:setOrderBelow(Egpobject Belowthis)
Makes the object render below the object (15 ops)
Egpobject:setText(
Text)
Changes the text of the text object (7 ops)
Egpobject:setText(
Text,
Font,
Size)
Changes the text, font, and text size of the text object (7 ops)
Egpobject:setAlign(
Halign)
Changes the horizontal alignment. Works on: text and text layout. Number can be 0, 1 or 2 (7 ops)
Egpobject:setAlign(
Halign,
Valign)
Changes the horizontal and vertical alignment. Works on: text and text layout. Numbers can be 0, 1 or 2 (7 ops)
Egpobject:setFiltering(
Filtering)
Changes the texture filter used to draw the object. Works on objects that draw a material. See _TEXFILTER constants (POINT=sharp, ANISOTROPIC=blurry/default) (7 ops)
Egpobject:setFont(
Font)
Changes the font of the text object (7 ops)
Egpobject:setFont(
Font,
Size)
Changes the font and size of the text object (7 ops)
Egpobject:setPos(
Pos)
Changes the world position of the 3D tracker object (10 ops)
Egpobject:setSize(
Size)
Changes the width and height of an object (7 ops)
Egpobject:setSize(
Width,
Height)
Changes the width and height of an object (7 ops)
Egpobject:setSize(
Size)
Changes the size of the text/line/outline object (7 ops)
Egpobject:setPos(
Pos)
Changes the position of the object (7 ops)
Egpobject:setPos(
X,
Y)
Changes the position of the object (7 ops)
Egpobject:setPos(
X,
Y,
X2,
Y2)
Changes the position of the start and end of a line object, otherwise acts normally. (7 ops)
Egpobject:setAngle(
Angle)
Changes the angle of the object (7 ops)
Egpobject:setPos(
X,
Y,
Angle)
Changes the position and angle of the object (7 ops)
Egpobject:rotateAroundAxis(
Worldpos,
Axispos,
Angle)
Rotates the object around the first vec2 with the second vec2 as offset at angle N (7 ops)
Egpobject:setVertices(
Verts)
(7 ops)
Egpobject:setVertices(...)
(7 ops)
Egpobject:setColor(
Color)
Changes the color and alpha of the object (7 ops)
Egpobject:setColor(
Color)
Changes the color of the object (7 ops)
Egpobject:setColor(
R,
G,
B,
A)
Changes the color and alpha of the object (7 ops)
Egpobject:setAlpha(
A)
Changes the alpha (transparency) of an object (7 ops)
Egpobject:setMaterial(
Material)
Changes the material of the object (7 ops)
Egpobject:setMaterialFromScreen(
Gpu)
Sets the material of the object to a current snapshot of the target screen. Note that this only works for players which see both the egp as well the target screen at that time (7 ops)
Egpobject:setFidelity(
Fidelity)
Changes the fidelity of the object (the number of vertices the circle will use) (7 ops)
= Egpobject:getFidelity()
Returns the fidelity of the object (7 ops)
Egpobject:parentTo(Egpobject Parent)
Parents the object to another object. Parented objects' positions are local to their parent (7 ops)
Egpobject:parentTo(
Parentindex)
Parents the object to another object. Parented objects' positions are local to their parent (7 ops)
:egpParent(Egpobject Child, Egpobject Parent)
Parents the object to another object. Parented objects' positions are local to their parent (7 ops)
Egpobject:trackerParent(
Parent)
Parents the 3D tracker object to an entity (7 ops)
= Egpobject:trackerParent()
Returns the parent entity of the 3D tracker object. (7 ops)
Egpobject:parentToCursor()
Parents the object to player's cursor (7 ops)
Egpobject:unparent()
Un-parents the object (7 ops)
= Egpobject:parentIndex()
Returns the index of the parent object (7 ops)
Egpobject = Egpobject:parent()
Returns the parent object (7 ops)
:egpRemove(Egpobject Obj)
(7 ops)
Egpobject:remove()
Removes the object from the screen (7 ops)
Egpobject:draw()
Shows a hidden EGP object. (7 ops)
Egpobject:hide()
Removes an object from the screen but keeps its data intact. (7 ops)
= Egpobject:isVisible()
Returns 1 if the object is visible. (7 ops)
= Egpobject:globalPos()
Returns the "global" (= it takes the parents' positions into consideration) position as a 3D vector. X and Y being the 2D X,Y coordinates, while Z is the angle (20 ops)
= Egpobject:globalVertices()
Returns an array of 2D vectors with the "global" positions of the vertices in the object (20 ops)
=
:egpHasObject(Egpobject Object)
Returns 1 if the object exists on the screen, 0 if not (20 ops)
= Egpobject:getPos()
Returns the position of the object (3 ops)
= Egpobject:getPosAng()
Returns the position (x, y) and angle (z) of the object (3 ops)
= Egpobject:getSize()
Returns the size of the object (3 ops)
= Egpobject:getSizeNum()
Returns the size of the text/line/outline object (3 ops)
= Egpobject:getColor4()
Returns the color of the object as a vector4 (3 ops)
= Egpobject:getColor()
Returns the color of the object as a vector (3 ops)
= Egpobject:getAlpha()
Returns the alpha of the object (3 ops)
= Egpobject:getAngle()
Returns the angle of the object (3 ops)
= Egpobject:getMaterial()
Returns the material of the object. Note this does not return anything when using a GPU material (3 ops)
= Egpobject:getRadius()
Returns the radius of the object (3 ops)
= Egpobject:getVertices()
Returns an array of the vertices of the object (10 ops)
= Egpobject:getObjectType()
Returns the type of the object (4 ops)
Egpobject =
:egpCopy(
Index, Egpobject From)
(15 ops)
Egpobject:copyFrom(Egpobject From)
Copies the settings of the second object into the first. If the first object does not exist, it's created (15 ops)
= Egpobject:containsPoint(
Point)
Returns 1 if the object contains the specified point (10 ops)
Egpobject =
:egpobject(
Index)
Returns the EGPObject at the index (5 ops)
Egpobject = noegpobject()
(1 ops)
= toString(Egpobject Egpo)
Returns a string representation of the EGPObject (1 ops)
= Egpobject:toString()
Returns a string representation of the EGPObject (1 ops)
Egpobject =
:egpTextLayout(
Index,
Args)
(10 ops)
Egpobject =
:egpLineStrip(
Index,
Args)
(10 ops)
Egpobject =
:egpCircleOutline(
Index,
Args)
(10 ops)
Egpobject =
:egpLine(
Index,
Args)
(10 ops)
Egpobject =
:egpBox(
Index,
Args)
(10 ops)
Egpobject =
:egpBoxOutline(
Index,
Args)
(10 ops)
Egpobject =
:egp3DTracker(
Index,
Args)
(10 ops)
Egpobject =
:egpCircle(
Index,
Args)
(10 ops)
Egpobject =
:egpRoundedBoxOutline(
Index,
Args)
(10 ops)
Egpobject =
:egpPoly(
Index,
Args)
(10 ops)
Egpobject =
:egpPolyOutline(
Index,
Args)
(10 ops)
Egpobject =
:egpRoundedBox(
Index,
Args)
(10 ops)
Egpobject =
:egpWedgeOutline(
Index,
Args)
(10 ops)
Egpobject =
:egpWedge(
Index,
Args)
(10 ops)
Egpobject =
:egpText(
Index,
Args)
(10 ops)